title: Hiding .DS_store from scandir()
body: <p>I am having some problems with a little script that outputs file from a particular directory into a table but it output the annoying .DS_store file as I am running this app on a mac.</p>
  
  <p>Here is my script to put - I have tried various methods that either stop the script working altogether or has no effect.</p>
  
  <pre><code>&lt;?php
  
  echo '&lt;table&gt;';
  
  $dir = 'archive/';
  $files = scandir($dir, 0);
  for($i = 2; $i &lt; count($files); $i++)
      echo '&lt;tr&gt;
            &lt;td&gt;' . $files[$i]. '&lt;/td&gt;
            &lt;td&gt;&lt;a href="' . $files[$i]. '" download&gt;&lt;button&gt;Download&lt;/button&gt;&lt;/a&gt;
            &lt;a href=""&gt;&lt;/a&gt;&lt;/td&gt;
            &lt;/tr&gt;';
  
  echo '&lt;/table&gt;';
  
  ?&gt;
  </code></pre>