title: PHP function to list files from path
body: <p>I have a variable which contains a path to folder ($path_to_folder)
  Looking how to build a function who will return all the files in this folder as a comma separated list.. 
  I have tried</p>
  
  <pre><code>$files = dirList($path_to_folder);
  sort($files);
  </code></pre>
  
  <p>but I could not use this as my function</p>
  
  <p>Thanks...</p>