title: Why is it whenever I use scandir() I receive periods at the beginning of the array?
body: <p>Why is it whenever I use scandir() I receive periods at the beginning of the array?</p>
  
  <pre><code>Array
  (
      [0] =&gt; .
      [1] =&gt; ..
      [2] =&gt; bar.php
      [3] =&gt; foo.txt
      [4] =&gt; somedir
  )
  Array
  (
      [0] =&gt; somedir
      [1] =&gt; foo.txt
      [2] =&gt; bar.php
      [3] =&gt; ..
      [4] =&gt; .
  )
  </code></pre>