Hi, I code in C/C++, but I don't know PHP. I am basically trying to write some PHP code to perform split testing on my WordPress blog. That is, I want to have a PHP code that will output one ad half the times, and a second ad the other half. I think it would be possible to do this generating a random number or reading the time, and then outputting one ad if the number is odd, and the second ad if the number is even, right?
So something like this in pseudo code:
x = random number;
if (x is odd)
<img src="ad1" />
else
<img src="ad2" />
Could anyone let me know how this code would be on PHP?
Thanks a lot.