Hiya, I have a folder full of images. Upon a page refresh, how do you randomly display one of the images, so if a new image is added, that too will automatically randomly be displayed?
<?php $image_extensions = array( 'php' ); $directory = './'; /* *** */ chdir($directory); $random_image = $images[array_rand($images = glob('*.{' . implode(',', array_values($image_extensions)) . '}', GLOB_BRACE), 1)]; echo $random_image; PHP: