How would you show the last 4 images of a gallery?
In the example, I know how to show a 4 limit max, but showing the last 4 is a different story.
`
<?php
$photos = get_sub_field(‘photos’);
if( $photos ):
$max = 4;
$count = 0;
foreach( $photos as $photo_id ):
$count++;
if ($count > $max):
break;
endif;
?>
<ul>
<li>
<?php wp_get_attachment_image( $photo_id, $size ) ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
`