I am using the following PHP snippet to loop through a directory of images and display thumbnails. The script is currently hard-coded to display up to 10 images. I am changing the value where you see 10 to increase to 20 photos. I figured this was a simple change, but even when I change all instances of 10 to 20 it STILL only shows 10 images? What am I missing here?
This script, as it stands, will bomb out if it fails to find one image in the sequence so if you have missed named an image that could stop the script working.
looks like it is meant to force a loop exit. It would be better to make this independent of the number of loop iterations by using break instead. Change it like so