I would like to know how to load an image in php using the variable below:
<?php
foreach (glob('cam/*.jpg') as $f) {
# store the image name
$list[] = $f;
}
sort($list); # sort is oldest to newest,
echo array_pop($list); # Newest
?>
How do I load the image file from array_pop($list)?
div>
As you would in PHP using the variable array_pop ($ list) and taking the first element of this array (latest image).