2010-01-30, 03:01 AM
Hey, I found this useful ad rotation script, and I want to incorporate it to my index_boardstats page, everything except the PHP script is working. How do I get PHP working (I understand there's systematic stuff involved)? Here's my script, it's pretty simplistic.
<?php
$bannerAd[1] = 'code for ad 1';
$bannerAd[2] = 'code for ad 2';
$bannerAd[3] = 'code for ad 3';
$bannerAd[4] = 'code for ad 4';
$bannerAd[5] = 'code for ad 5';
$adCount = count($bannerAd);
$randomAdNumber = mt_rand(1, $adCount);
echo $bannerAd[$randomAdNumber];
?>