Display different links

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
nparekh
Forum Commoner
Posts: 31
Joined: Fri Aug 05, 2005 2:35 am

Display different links

Post by nparekh »

Hi guys

I have an include statement that displays a set link e.g http://www.mydomain.com/link1.html

What I am trying to do is split test prices on maybe one,two or three different links(link1 price =$67, link2 price =$97, link3 price =$147 etc) to see which one pulls a better response in terms of leads/sales of my product.

So I have a page e.g http://www.mydomain.com/index.html which will pull link1, link2 or link3.html in based on the php script used.

I was led to believe the array script might help?

Any ideas?

Regards,

Nikhil
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

what's an "array script" ?
nparekh
Forum Commoner
Posts: 31
Joined: Fri Aug 05, 2005 2:35 am

Post by nparekh »

Sorry I meant the array statement.

Is there a better way to pick between 3 different links and automatically display one of them on an html page?

Thanks again

Nikhil
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

using an array is a simple one. You can use array_rand() to select an element randomly.

Alternately, you could use one of the random functions.
nparekh
Forum Commoner
Posts: 31
Joined: Fri Aug 05, 2005 2:35 am

Thank You

Post by nparekh »

Hi feyd,

Thanks for that - I think that array_rand() will do the trick. Is it possible to have the actual element to be a link i.e. http://www.mydomain.com/link1.html that is actually clickable? I tried it now with an element called http://www.mydomain.com/link1.html but its not clickable at present.

Thanks again in advance

Regards,

Nikhil
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

you can make it clickable seperately..
Post Reply