I am trying to edit and change a theme applied to a coppermine gallery. I have some basic HTML knowledge, but that's all. So, I found the code of my image called as "headerbg.gif".
I want to replace that code so that the image is random ... I found the following code:HTML Code:.header{ background: url(images/headerbg.gif) no-repeat; width: 760px; height: 143px; float: left; }
The problem is that PHP, and this stylesheet is difficult to eat this code ...PHP Code:<?
$imgs = array("image1.gif", "image2.gif", "image3.gif");
srand ((double)microtime()*1000000);
shuffle($imgs);
echo '< img src = "imagedirectory/' . $imgs[0] . '" border = "0" alt="" />';
?>
Someone have an idea to display a random image? Or even change the image every day?


Reply With Quote

Bookmarks