Quote Originally Posted by MysticMentalist
div.head{

<?php $bgi=rand(1, 10);
switch($bgi)
{case 1: echo 'background-image: url('/header/h1.gif');'; break;
case 2: echo 'background-image: url('/header/h2.gif');'; break;
case 3: echo 'background-image: url('/header/h3.gif');'; break;
case 4: echo 'background-image: url('/header/h4.gif');'; break;
case 5: echo 'background-image: url('/header/h5.gif');'; break;
case 6: echo 'background-image: url('/header/h6.gif');'; break;
case 7: echo 'background-image: url('/header/h7.gif');'; break;
case 8: echo 'background-image: url('/header/h8.gif');'; break;
case 9: echo 'background-image: url('/header/h9.gif');'; break;
case 10: echo 'background-image: url('/header/h9.gif');'; break;
?>}
that's a lot of code tbh you would be better off with

div.head{

<?php $bgi=rand(1, 10);
echo "background-image: url('/header/h".$bgi.".gif');";
?>}

be processed in about the 24th of the time

and tbh using the GD module for a random image is pointless as hell, every web browser i've seen has the ability to grab the image tag out of the images raw data to know the type

and anyway just use an apache conf file and throw the php into a file with an image ext so it's forum and xhtml safe