Hi. I’d like to receive an image from an array, sequentially, after I click a button.
// MAKE AN ARRAY OF THE JPG IMAGE FILE NAMES
$b = array();
while (($filename = readdir($dh)) !== FALSE)
// CHOOSE ONLY JPG IMAGES
$file_ext = strtoupper(end(explode(‘.’, $filename)));
if ($file_ext != ‘JPG’) continue;
$b = $filename; } closedir($dh); // MAKE AN ARRAY OF THE JPG IMAGE FILE NAMES // WITH ALL FILE NAMES IN AN ARRAY, RANDOMIZE THE LIST AND CHOOSE ONE shuffle($b); $banner_name = array_pop($b); $banner_url = $my_dir . $banner_name;