Excuse the idiocy, but I can't work out how to make this script I've written work from an img link in an HTML page - all it does it return a path to a random image in a directory. I got the script working in about 2 minutes but getting it to work in a browser is another issue.
<?php
srand ((float) microtime() * 10000000);
$images = Array("blue.jpg", "grey.jpg", "green.jpg", "orange.jpg", "pink.jpg");
$chosenIMG = "images/".$images[array_rand($images, 1)];
print "<img src=$chosenIMG>";
?>
So how can I get the random path into an IMG path? i.e. <img src="random.php"> so it shows the image and not the link to the php script?
Cheers!