Try this:
Code:
$random_number2 = rand(1, 4);
$random_banner2[1] = '<a href="http://www.mysite.com"><img src="http://www.mysite.com/banner1.gif" alt="" border="0" /></a>';
$random_banner2[2] = '<a href="http://www.mysite.com"><img src="http://www.mysite.com/banner2.gif" alt="" border="0" /></a>';
$random_banner2[3] = '<a href="http://www.mysite.com"><img src="http://www.mysite.com/banner3.gif" alt="" border="0" /></a>';
$random_banner2[4] = '<a href="http://www.mysite.com"><img src="http://www.mysite.com/banner4.gif" alt="" border="0" /></a>';
Then this to display:
Code:
$random_banner2[$random_number2]
If that does not work, where are you putting each of the code blocks?