title: Displaying latest 10 images from file directory
body: <p>I'm using this piece of php to pull the latest images from my directory, but I only want to display the latest 10 uploads instead of everything. </p>
  
  <p>Anybody an idea how to alter the code so it does this? Thanks!</p>
  
  <pre><code>&lt;?php
     $files = glob("images/*.*");
     for ($i=1; $i&lt;count($files); $i++){
  
        $image = $files[$i];
        echo '&lt;img src="'.$image .'" alt="Random image" id="lay"/&gt;';
     }
  ?&gt;
  </code></pre>