appear div on maxCols

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 31, 2016   (RSS)

By Damon - May 30, 2016

Hi,

Try this code:

  <div class="row">
<?php foreach ($productsRecords as $record): ?>
  <div class="col-md-3 >.....</div>
<?php $maxCols=4; if (@++$count % $maxCols == 0): ?>
  </div>
  <div class="row">
<?php endif; ?>
<?php endforeach; ?>
  </div>

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By petrogus - July 31, 2016

Thank Damon !!!

it works fine thank you for your help

PetroGus