<?php
$html_array = glob("*.html");
function sort_by_mtime($file1,$file2) {
$time1 = filemtime($file1);
$time2 = filemtime($file2);
if ($time1 == $time2) {
return 0;
}
return ($time1 < $time2) ? 1 : -1;
}
usort($html_array,"sort_by_mtime");
//$html_array is now ordered by the time it was last modified
?>