S odkazmi je to najjednoduchšie asi cez pole.
Kód:
<?php
$array = array (
"1" => "http://www.odkazcislojedna.sk",
"2" => "http://www.odkazcislodva.sk",
"3" => "http://www.odkazcislotri.sk"
);
$baner = rand(1, 3); //nahodne cislo od jedna do tri
$typ = ".jpg"; //pripona suboru
?>
<a href="<?php echo $array[$baner]?>">
<img src="<?php echo $baner.$typ"; ?>" />
</a>
Neskúšal som to, ale malo by to fungovať.
_________________
A. S. Tanenbaum píše:
The terms LF, MF, and HF refer to low, medium, and high frequency, respectively. Clearly, when the names were assigned, nobody expected to go above 10 MHz, so the higher bands were later named the Very, Ultra, Super, Extremely, and Tremendously High Frequency bands. Beyond that there are no names, but Incredibly, Astonishingly, and Prodigiously high frequency (IHF, AHF, and PHF) would sound nice.