title: PHP - Code to traverse a directory and get all the files(images)
body: <p>i want to write a page that will traverse a specified directory.... and get all the files in that directory... </p>
  
  <p>in my case the directory will only contain images and display the images with their links...</p>
  
  <p>something like this</p>
  
  <p><img src="https://i.stack.imgur.com/ceiFy.png" alt="Example"></p>
  
  <p><strong>How to Do it</strong></p>
  
  <p>p.s. the directory will not be user input.. it will be same directory always...</p>