Hello, I would like to know if the following is possible: Create a random link As in the following example User clicks a link 1 out of 5 times it sends them to page #1 2 out of 5 times it goes to page #2 2 out of 5 times is goes to page #3 Or something like that?? Possible or not? Thanks
You can do this like this: <?php$links = array(array('url' => 'http://google.com', 'name'=>'google'), array('url' => 'http://hotmail.com', 'name' => 'hotmail'), array('url' => 'http://hawkee.com', 'name' => 'Hawkee')); $num = array_rand($links);$item = $links[$num]; printf('<a href="%s" title="%s">%s</a>', $item['url'], $item['name'], $item['name']); ?> PHP: