So, what à do is trying to display the 3 first element of an array. Always 3. But, there is not always at least 3 elements.
So, what I’ve done is using an if :
<?php for ($i = 0; $i <= 2; $i++) { ?>
<?php if($post["Project"]["Post"][$i]){ ?>
...
<?php } ?>
<?php } ?>
But, I keep having “undefined offset” error when there is not 3 entries at least. Anyone with a solution ?
Try the following: