title: how to exclude a certain folder when using scandir in php
body: <p>I am using scandir to list all the files in a directory. But there should be an exception for <code>./</code>, <code>../</code> and <code>tmp</code> folder.</p>
  
  <p>I already have this to exclude the dot and double dot:</p>
  
  <pre><code>$files = preg_grep('/^([^.])/', scandir($dir));
  </code></pre>
  
  <p>How can i add <code>tmp</code> folder to it? (name of the folder is tmp)</p>