dynamically insert the words on hyperlinks

dahunter

On My Path To Mastery
Dec 7, 2008
80
1
0
los angeles
Just wondering if there's a way to dynamically change the hyperlink text.

So let's say I have 2 offers I am rotating in one link:

OFFERNAME1
OFFERNAME2

So what I want to do is instead of showing

"Click Here For Offer"

Would be to show:
"Click Here for OFFERNAME1"
and then
"Click Here for OFFERNAME2"

When it's going to redirect to each. According to the offer that I am rotating.

So basically the code would be like this:
<a href="http://domain.com/rotatinglink">Click for Offer</a>
And where it says "Offer" it would have to have some sort of dynamic code to insert the variable i put on the offer name.
 


Well that's easy...Here my proposal:

Code:
<?php
$anchor_text_array1 = array(
    '<a href="http://www.your-link.com" target="_blank" title="TITLE 1">TITLE 1</a>',
    '<a href="http://www.your-link.com" target="_blank" title="TITLE 2">TITLE 2</a>',
    '<a href="http://www.your-link.com" target="_blank" title="TITLE 3">TITLE 3</a>',
    );
shuffle($anchor_text_array1);
$anchor_text = $anchor_text_array1[0];
?>