I was getting my photo from a folder randomly as the code below:
$imagesDir = 'tags/chilli_crab/';
$images = glob($imagesDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);
$randomImage = $images[array_rand($images)];
How can I change this to get the latest photo instead of the random one? Thanks!!!!!!