Can you change the AdSense code at all?

Discussion in 'Guidelines / Compliance' started by powwka, Jan 11, 2007.

  1. #1
    Can you take the double quotes and change them into single quotes? For example, when I want to do <?php echo "adsense code here" ?>
    For that to work, I need single quotes on all the adsense code. Is that ok?

    EDIT: Ok I just tried <?php echo 'adsense code here' ?> and left the code with double quotes and I guess that works. I didn't know you could use single quotes with PHP.
     
    powwka, Jan 11, 2007 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    I don't think that would be a huge violation. But you could always just escape the double quotes...
     
    frankcow, Jan 11, 2007 IP
  3. Northie

    Northie Peon

    Messages:
    80
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's javascript, so I think the double quotes are important

    If you want to display it with php then escape the double quotes first

    eg

    $var = "here is an escaped \" double quote";
    echo $var;
    //displays
    //here is an escaped " double quote

    do a find and replace in the adsense code, change " to \"

    have fun!
     
    Northie, Jan 11, 2007 IP