How to code a PHP sequence array. Help.
// Create the array $links = array(); // Populare the array $links[0] = "http://www.site.com/ads1.php"; $links[1] = "http://www.site.com/ads2.php"; $links[2] = "http://www.site.com/ads3.php"; // Count links $num = count($links); // Randomize order $random = rand(0, $num-1); // Print random link echo $links[$random];
I imagine this is fairly simple? Could someone show me or direct me to a website explaining? Thanks.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[EasySocials.com] -Buy Youtube (Views, Followers, Subs, Likes, Comments), Facebook Fans, Twitter (Followers & Retweets), Pinterest, Tumblr, Instagram, Vimeo, Soundcloud. [Affiliate & Reseller Program Available]