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.
-
goosefrabah -
[ 1 ] Thanks
SignaturePremium Content by Real English Writers That Will Have Your Visitors Coming Back for More{{ DiscussionBoard.errors[5590281].message }} -
-
goosefrabah -
[ 1 ] Thanks - 1 reply
SignaturePremium Content by Real English Writers That Will Have Your Visitors Coming Back for More{{ DiscussionBoard.errors[5590294].message }}-
Brandon Tanner -
[ 1 ] Thanks
Signature{{ DiscussionBoard.errors[5593256].message }} -
-
-
Alexander K -
Thanks
Signature[YouDeserveWealth.com] - Create generational wealth with passive income.{{ DiscussionBoard.errors[5593768].message }} -