title: PHP & HTML: how to loop through a directory with images?
body: <p>very simple folderstructure like this …</p>
  
  <ul>
  <li>index.php</li>
  <li>img
  <ul>
  <li>someimage1.jpg</li>
  <li>someimage2.png</li>
  <li>someimage3.jpg</li>
  </ul></li>
  </ul>
  
  <p>I wonder how difficult it is to use php to read this img folder and create a microsite that loops through this images with "prev" and "next" links. </p>
  
  <p>So I don't want to manually specify what the filenames of the images are. I just want to add images to the folder and a php script runs through them and creates a navigation like that</p>
  
  <pre><code>&lt;a href="nextimage-link" class="next"&gt;Next Image&lt;/a&gt;
  &lt;a href="previmage-link" class="prev"&gt;Previous Image&lt;/a&gt;
  </code></pre>
  
  <p>So whenever I click on the "Next Image" link it updates the site and shows the next image.</p>
  
  <p>Is that complicated to build? Any ideas on that?
  Thank you in advance for your tipps and help.</p>