Is there an easy way with PHP to simply rotate multiple banner advertisments. I am not wanting to use JS as I want the links to be straight html. Any help would be appreciated. Thanks
Yes.. you can use a mysql database, or encode it in the script it self.... example of none mysql <?php $adcodes = Array('Code one here','Another code here','And another here','and so on'); $ctr = count($adcodes) -1; $l=rand(0,$ctr); echo $adcodes[$l]; ?> Code (markup): This sample is random select of ads... to display everytime a page display....
Thanks for the help PinoyIto, that's exactly what I wanted to achieve. Vizuke, what do you mean by hardcoding? As in, putting banner code for each additional banner in the code?
If you don't want hard coded, you may use mysql and store all your codes there and call them randomly but this will eat more resources of your server than the hard coded one.