title: Exclude hidden files from scandir
body: <p>I am using the following code to get a list of images in a directory:</p>
  
  <pre><code>$files = scandir($imagepath);
  </code></pre>
  
  <p>but <code>$files</code> also includes hidden files. How can I exclude them?</p>