I use this code and it will display the very last image that I uploaded to my “images” folder. However, I am in need of displaying the last two images that I uploaded to my “images” folder. Can someone take a peek and tell me where I may need to insert code to get the job done.
<?php $dir = 'images/'; $base_url = 'images/'; $newest_mtime = 0; $show_file = 'BROKEN'; if ($handle = opendir($base_url)) { while (false !== ($file = readdir($handle))) { if (($file != '.') && ($file != '..') && ($file != '.htaccess')) { $mtime = filemtime("$base_url/$file"); if ($mtime > $newest_mtime) { $newest_mtime = $mtime; $show_file = "$base_url/$file"; } } } } print '