Is there any way to sort this, so that they are in order Alphabetically.
<?
if ($handle = opendir('dir/')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<PRE>";
$t="<a href=reports/$file>$file</a>";
echo $t.substr($space,0,40-strlen($file));
echo "\n";
echo "</PRE>";
"<br>";
}
}
}
closedir($handle);
?>
Thanks in advance.