Why is it whenever I use scandir() I receive periods at the beginning of the array?
Array ( [0] => . [1] => .. [2] => bar.php [3] =&
In Unix convention . is a link to the current directory while .. is a link to the parent directory. Both of them exist as a file in the directory index.