I want to randomly change the color of my Google ad to one of four colors, and am having trouble getting it to work. I created a new plugin using the navbits hook with the following code:
Code:
$randcolor = mt_rand(1, 4);
$whichcolor[1] = "FF6699";
$whichcolor[2] = "FBCC30";
$whichcolor[3] = "DFEF30";
$whichcolor[4] = "97CC45";
$adcolor = $whichcolor[$randcolor];
and put the adsense code in the navbar with $adcolor for the background and border value, but when I load the page it's blank where the variable should be. What am I doing wrong?