Currently, there is no real sort. The file system automatically sorts them lower numbers to higher.
My clients wants them sorted in descending order so that the most recent documents appear before the older documents.
I am sure it's easy to do; alas, I am a noob.
Here is my code:
Code: Select all
<?php
$dir = "../esmpd_minutes";
if ($handle = opendir($dir)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<li class='.listitem'><a href=\"" . $dir . "/" . $file . "\">" . $file . "</a></li><br />\n";
}
}
closedir($handle);
}
?>Dumb it down for me due to my afor-mentioned noob-ness.
Please and thank you.