title: PHP function to read directory & collect filenames &subdirectory names into an array?
body: <p>I have been trying to find the correct PHP function to do the following:</p>
  
  <p><b>PHP function that reads a directory and collects all the filenames (and subdirectory names) into an array.</b></p>
  
  <p>I have been searching for a while, not to sure on what exactly is the correct answer.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks.</p>