I have this code:
switch ($animal) {
case "Dog":
// Offer 123
$product = "http://site1.com?var=$var";
break;
case "Cat":
// Offer 456
$product = "http://site2.com?var=$var";
break;
etc....
}
But I want to send have 2 links rotated under each case.
e.g.
$product = "http://site1a.com?var=$var"; 50% of the time
$product = "http://site1b.com?var=$var"; 50% of the time
It would choose site1a.com 50% of the time and site1b.com 50% of the time. This would be ideal. Alternatively, if it randomly chose either one but over time it would average roughly 50% exposure for each link.
Any ideas on how I might achieve this?
Thanks,
Jon