Good afternoon everyone,

I need to display files in a directory and have the following code, which works great:

<?php
$dir = "documents/";
$dh = opendir($dir);
while (($file = readdir($dh)) !== false) {
echo '<a href="documents/'.$file.'">'.$file.'</a><br />';
}
closedir($dh);
?>

The results I get is:

De Beer 01.doc
De Beer 02.doc
.
..
Engelbrecht 01.doc

Can anyone please tell me how to remove the . and .. ?

Any help would be much appreciated.