I have this script. It works by taking all the pictures in a folder, and make a webpage of it. Oldest picture on top, and newer pictures down the page.
How can I revert the way the pictures are displayed? I want the newest on top.
<?php
$folder = 'ute/grabs/';
$filetype = '*.*';
$files = glob($folder.$filetype);
$count = count($files);
echo '<table>';
for ($i = 0; $i < $count; $i++) {
echo '<tr><td>';
echo '<a name="'.$i.'" href="#'.$i.'"><img src="'.$files[$i].'" /></a>';
echo substr($files[$i],strlen($folder),strpos($files[$i], '.')-strlen($folder));
echo '</td></tr>';
}
echo '</table>';
?>