I need help modifying the following code.
I would like it to display the latest 15 images in random order.
Currently it shows then in reverse chronological.
Can someone help me?
[php]<?php
//Your folder
$files = glob(“images/.”);
function sortnewestfilesfirst($a, $b) {
return filemtime($b) - filemtime($a);
}
usort($files, “sortnewestfilesfirst”);
$colCnt=0;
echo ‘
| ’;
$num = $files[$i]; echo ’
echo ‘ | ’;
?>[/php]