Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Looping lists in chunks/batches, as mentioned here
<?php foreach (array_chunk($photoList, 2) as $photos): ?>
<div class="grid-row">
<?php foreach ($photos as $key => $photo): ?>
<div class="grid-overlay__img-container">
<div class="grid-overlay__img" data-src="<?= $photo['url_full'] ?>"></div>
<?php endforeach; ?>
<?php endforeach; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.