Need Help: How to rotate links through image?

1nv1nc1ble

Newbie
Joined
Apr 13, 2010
Messages
16
Reaction score
2
Ok I didn't know how to properly phrase what I am looking to do.

Basically I want to have a single image that when clicked it links to one of two rotating links.

So basically something like this, but with two rotating links:

Code:
<a href="hxxp://domain.com" target="_blank">
<img src="hxxp://domain.com/image.jpg" />
</a>

Hopefully this makes sense and thanks in advance for any help.
 
here ya go! you can add more links if need be!

<?php
$links = array();

$links[] = 'http://link1';
$links[] = 'http://link2';
$links[] = 'http://link3';

shuffle($links);

?>


<a href="<?php echo $links[0];?>" target="_blank">
<img src="hxxp://domain.com/image.jpg" />
</a>
 
Jbrewski Thanks a lot man I appreciate the help! :D
 
Back
Top