Hi I am pulling thumbs from a directory with the following function: Can you tell me how to limit the number of thumbs that this displays please? ( Lets say, only display 10 thumbs ) Thanks so much, here is the code <?php $largeArray = glob("images/*.jpg"); $counter = 0; foreach (glob("images/thumbs/*.jpg") as $thumb) { echo ("<div class='thumbnail'><a href='$largeArray[$counter]'><img src='$thumb'/></a></div>"); $counter++; } ?> PHP: