Hello! 🙂
I do have five different url:s.
How can I randomly select any of those 5 sites when clicking on a text and redirect the user there.
Thanks in advance.
how are the urls stored? in a database or text file or array?
I just currently did something similar to this. You just need to take the urls and put them in to an array and then use the function shuffle() and the use a for loop to display them out or put them where ever you need them to be.
Originally posted by drew010 how are the urls stored? in a database or text file or array?
I am thinking on to set them as variables, like
$link1 = "http://www.cnn.com"; $link2 = "http://www.cbs.com";
etc.