I have this code which works well:
function random_pic($dir = 'img')
{
$files = glob($dir . '/*.png');
$file = array_rand($files);
}
It grabs a random image from a directory. I have this in later:
<img src="<?php echo random_pic(); ?>"/>
<img src="<?php echo random_pic(); ?>"/>
Any way I can make it so it they both don't display the same picture?