Hi there,
I am using this code created by SpikeZ to list a content of a directory.
But now, I was wondering, is there a way to arrage the output by the newest file(eg, arrange by the Date of Creation)? and also high light it in bold?PHP Code:$the_array = Array();
$handle = opendir('/usr/');
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") { /* as descripted below: these "files" will not be added to the array */
$the_array[] = $file;
}
}
closedir($handle);
foreach ($the_array as $element) {
echo "$element";
echo '<br>';
}




)
Bookmarks