google_color_border = "<? print $a[$rnd] ; ?>"; This code is intended to randomly display color of border. And i am getting error Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' a is array rnd = random of numbers
You have PHP inside PHP. You should be using: <?php echo 'google_color_border = "'. $a[$rnd] .'"'; ?> See how that works out for you.
You are aware that this falls under "modifying Adsense code" and is a ToS violation right? In any case a much better way to do this would be to use Adsense itself. Create color schemes with borders of your liking, then when you are creating your AdSense code, you can select up to four of them by "Ctrl clicking" in the color palette chooser. AdSense will then randomly display ads with the different colors.
But that's not our concern, is it Yes, it could fall under modifying the code and something I would not not do either, I would simply use the custom random sorting they have built in.
Yes you are! how come you say you are not modyfing the code but you add sumthing into Google code. In any cases, they (Goolge or your enimies) can claim that you are modifying the code, because the code does not stay intact anymore. Simple as that! but it's up to you!
NO it's in php file and when its html will be generated it will be quite normal. And one more thing i am not indeed changing the code i am just setting the color.And it's on publisher how he changes it..
Tauren is right , if you modify the colors in php you will output a different colored ad every time but the client side javascript will be the same as the original (except a different color) the effect is like you go to the ad generator at google and create different colored ads there