Forum Moderators: coopster
This is my layout
+++++++++++++++++++++++++++++++++++++++++
Country ¦ Ad1 ¦Ad2 ¦ Ad3
+++++++++++++++++++++++++++++++++++++++++
however i ran into a bit of a problem, when suppose one of the ad space is blank say for example it is ad2 that is blank, how do i implement a loop to see ad1 or ad3 (randolmy), and if one of them is not blank then randomly display the corresponding ad.
gotten this far
If(somecountry==$country){
}
Thank You
I would store the data in an array, give them a shuffle using the shuffle() [uk.php.net] function and then output something from a certain slot. Each time you refresh you should get a different output.
Example for random image:
$images = array('image1.jpg','image2.jpg','image3.jpg');
shuffle($images);echo $images[0];
dc