Hi
How can I sort the output of this directory by alphabetical then numerical order?
<?php
$dirname = "./";
$dir = opendir($dirname);
echo ("<hr />");
while ($file = readdir($dir))
{
$parts = explode(".", $file);
if (is_array($parts) && count($parts) > 1)
{
$extension = end($parts);
if ($extension == "pdf")
echo "<img src=\"http://www.website.com/images/pdf.gif\" alt=\"pdf\" width=\"17\" height=\"17\" border=\"0\" /> <a href=\"javascript:popUp('$dirname$file')\"> $file </a><br />";
}
}
closedir($dir);
?>