I am trying display comics in rows of four however I am trying to arrange the comics in a pagination system where there is 20 comics to a page. However before that I need to get the layout correct, at the present I am using a foreach loop which displays the content just not how I want them to be presented.
My code
[php]
<?php foreach($comics as $list): ?>
<?= ($list['image'] <> "" ? "
<?= ($list['name'] <> "" ? $list['name'] : "") ?> #<?= ($list['issue'] <> "" ? $list['issue'] : "") ?>
<?php endforeach; ?>
<?php
}else {
?>
You haven’t posted any comic yet!
<?php } ?>
Should I use a While loop or is what I have appropriate and am I doing the foreach loops in the wrong place ?