Code is below. I want to sort these in DESC order according the file date. Is there way to do that?
$dir = "../mydir/";
$dh = opendir($dir);
// get file names
while (false !== ($filename = readdir($dh))) {
if($filename !="." AND $filename !=".."){
echo "<li>".substr($filename, 0, -4)."</li>";
}
}
I could always add a database entry to the process but I am trying to keep it simple.
Thanks for any help.