0

so I have this code

     <?php 

      $images = glob("slike/*.*");

      sort($images);

      foreach ($images as $img) {

        echo '<div class="image_wrapper"><img src="'.$img.'"></div>';

      }

    ?>

and it's working great but I want to pull only 20 latest photos and not all of them since there is over one hundred.

How can I do this? Also is there a way to show it like from 5th to 25th?

0 Answers0