I found many php scripts that allow me to display random images. BUT they work inside a htm(l) file… I need one that will work inside a php file !!!
suggestions ???
Thanks
I found many php scripts that allow me to display random images. BUT they work inside a htm(l) file… I need one that will work inside a php file !!!
suggestions ???
Thanks
[quote]I found many php scripts that allow me to display random images. BUT they work inside a htm(l) file… I need one that will work inside a php file !!!
suggestions ???[/quote]
Hire a PHP developer to write something like this for you?
[code]function randomimage() {
// A list of random image filenames.
$randomimage_filenames = array(
‘image1.jpg’,
‘image2.gif’,
‘image3.jpg’,
‘image4.gif’,
‘image5.png’
);
// Count how many filenames there are.
$randomimage_count = count($randomimage_filenames);
// Pick one at random.
$randomimage_number = mt_rand(0, $randomimage_count - 1);
$randomimage_filename = $randomimage_filenames[$randomimage_number];
// Return the filename as our result.
return $randomimage_filename;
}
echo ‘’;[/code]
openvein.org -//-