I’m using a php foreach statement like this:
<?php foreach($files as $f): ?>
lots of HTML
<?php endforeach; ?>
how can I put a conditional inside the loop that so that it will skip ahead to the next iteration. I know that I’m supposed to use continue, but I’m not sure how to do it with closed php statements like this. Would it be a separate php statement? Could it be placed halfway down in the HTML so that some but not all of the stuff within the loop is executed?
Yes, you can insert the condition and
continuewherever you want:See it in action.