I am reading files from a selected directory into links for downloads.Any suggestions on how to have these come out ascending order.
Here is the full code:
$handle=opendir("/home/groupvertical/www/pellegirl/pdf/owspring/");
while ($file = readdir($handle))
{
if ($file == "." || $file == "..")
{ }
else
{
echo "-"; // makes the bulleted list
print "<a href=\"/pellegirl/pdf/owspring/$file\" target=\"_blank\">$file</a><br>\n";
}
}
closedir($handle);