Posted By

hotdiggity on 06/02/10


Tagged

php banner rotation


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

silverskymedia
eval


Simple Banner Rotation


 / Published in: PHP
 

  1. <?php
  2. $bannerAd[1] = '<a href="[~267~]"><img src="banner1.png" alt="Banner1" /></a>';
  3. $bannerAd[2] = '<a href="[~265~]"><img src="banner2.png" alt="Banner2" /></a>';
  4. $adCount = count($bannerAd);
  5. $randomAdNumber = mt_rand(1, $adCount);
  6. echo $bannerAd[$randomAdNumber];
  7. ?>

Report this snippet  

You need to login to post a comment.