Hi i am making a before and after plugin for a CMS. The plugin requires 2 images on each loop of the foreach. one for the before and one for the after. the 2 images are then layered on top of each other
my code gets the same image out twice. can i make the loop store the URLs and then echo the url i want? am not good with arrays:
<?php foreach ($images as $img):
<img src="<?php echo $img->large->src; ?>" alt="Before"/>
<img src="<?php echo $img->large->src; ?>" alt="After"/>
<?php endforeach; ?>
I am actually tying to output the before and after into an image slider. So i need to get 2 images out for each slide <li> of the image slider.
hope thats understandable.