I'm looping through an unknown number of containers which are using the col-md-8 Bootstrap class. I want to include next to the first iteration a col-md-4 class to offer up as a sidebar.
I need to pause the loop after the first iteration include my div then carry on looping from where it left off. Is there a php pause for the foreach loop so I can achieve this.
<?php foreach ($news as $new) : ?> <div class="col-md-8"> </div> <?php endforeach; ?>
col-md-4column, else do nothing.<div class="col-md-12"><div class="col-md-8"><? // News items loop here ?></div><div class="col-md-4"><? // sidebar here ?></div></div>