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".
HTML Code:
.header{
background: url(images/headerbg.gif) no-repeat;
width: 760px;
height: 143px;
float: left;
}
I want to replace that code so that the image is random ... I found the following 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="" />';
?>
The problem is that PHP, and this stylesheet is difficult to eat this code ...
Someone have an idea to display a random image? Or even change the image every day?
Bookmarks