In my application I have to loop images with two sizes. Lets call them large and small.. These images are in two columns like below.
large small
large small
large small
I produce the larage/small image by a class by doing this now like this:
<?php $count = 0; ?>
<?php foreach ($posts as $post) : ?>
<div class=" <?=(++$count%2 ? "col-7 pr-10" : "col-5 pl-10");?> mt-15">
<?php endforeach; ?>
What I would like to do here by now is to produce this list;
large small
small large
large small
etc..
In what kind of way can I do this? I guess I have to create a kind of reset after each 2 entries and set odd to eve and vise versa ?