This is a script that shows images in a folder. But is there a way that I can show the latest image first? Instead of the other way around.
$images = glob('*.{gif,png,jpg,jpeg}', GLOB_BRACE); // formats to look for
$num_of_files = 2; // number of images to display
foreach($images as $image)
{
$num_of_files--;
if($num_of_files > -1) // this made me laugh when I wrote it
echo "<b>".$image."</b><br>Created on ".date('D, d M y H:i:s', filemtime($image)) ."<br><img src="."'".$image."' style='width: 95%'"."><br><br>" ; // display images
else
break;
}