+ Reply to Thread
Results 1 to 5 of 5

Thread: I dont understand php all that much

  1. #1
    scylla is offline x10 Sophmore scylla is an unknown quantity at this point
    Join Date
    Feb 2005
    Posts
    116

    I dont understand php all that much

    so I have a question about this... How do I insert my adsense code properly in this file?

    With the way it is right now, it says
    "Parse error: syntax error, unexpected T_STRING in /home/content/a/v/a/avalanch/html/playstation-3/config.php on line 11"

    PHP Code:
    <?php
    $title 
    "Playstation Hub"
    // Title of your website

    $keyword "playstation+3"
    // The keyword that your content will be based on
    // For keywords with two or more words, use "+" instead of space
    // i.e. "new+york+travel"

    $ads "<google>
    <script type="
    text/javascript"><!--
    google_ad_client = "
    pub-6991322522351721";
    google_ad_width = 120;
    google_ad_height = 600;
    google_ad_format = "
    120x600_as";
    google_ad_type = "
    text_image";
    google_ad_channel ="";
    google_color_border = "
    CCCCCC";
    google_color_bg = "
    CCCCCC";
    google_color_link = "
    0000FF";
    google_color_url = "
    0000FF";
    google_color_text = "
    0000FF";
    //--></script>
    <script src="
    http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
    </script>
    </google>";
    // Your ads which will be displayed on the pages

    $text_color = "black"; 
    // The color of text which is displayed

    $table_fill = "#2375A4"; 
    // The table fill color

    $menu_color = "#95CC02"; 
    // The menu color
    ?>

  2. #2
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: I dont understand php all that much

    The google tag is not avaialable on html So i think the tag google has to be removed.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: I dont understand php all that much

    PHP Code:
    <?php
     
     
    $ads 
    '<google>
    <script type="text/javascript"><!--
    google_ad_client = "pub-6991322522351721";
    google_ad_width = 120;
    google_ad_height = 600;
    google_ad_format = "120x600_as";
    google_ad_type = "text_image";
    google_ad_channel ="";
    google_color_border = "CCCCCC";
    google_color_bg = "CCCCCC";
    google_color_link = "0000FF";
    google_color_url = "0000FF";
    google_color_text = "0000FF";
    //--></script>
    <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
    </script>
    </google>'
    ;
     
    ?>
    Use single quotes around the string you are using (since you are using double quotes inside the string).
    Last edited by descalzo; 12-16-2009 at 02:35 PM.

  4. #4
    scylla is offline x10 Sophmore scylla is an unknown quantity at this point
    Join Date
    Feb 2005
    Posts
    116

    Re: I dont understand php all that much

    Thanks for that descalzo, it's working great on my script now at http://video-game-chat.com/playstation-3/ but now I need to get that skyscraper changed to a leaderboard ad

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: I dont understand php all that much

    Read up on string syntax in PHP for more info. Note also the coloration of your code in your post, how it switches between red (within a string) and blue (not in a string), and compare it to Descalzo's (all red).
    Last edited by misson; 12-16-2009 at 03:38 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers