SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2000
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello, I'm trying to put meta tags on my homepage and I have to do it in the following format
    echo "<html>\n<head>\n";
    I was wondering how I could put
    <META name="description" content="whatever"> without getting any parse errors? I think I'm getting these errors because of the quotation marks, is there a way to get around this?

    Thanks
    Have you ever been ripped off, lied to or cheated? If so, check out
    Baddealings.com

  2. #2
    Non-Member
    Join Date
    Apr 2000
    Location
    Waco, Texas.
    Posts
    188
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could use single quotes.
    echo ' double quote "unslashed" ';

    But , the easiest way would be to not use PHP to print the html code.
    Why not just use
    Code:
    <?
    php code
    here
    ?>
    <html>
    <head>
    <meta>
    <?
    more php
    code
    ?>

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or use escape character for those special ones: echo "<a href=\"LINK\">";
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2000
    Posts
    94
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys, worked perfectly
    Have you ever been ripped off, lied to or cheated? If so, check out
    Baddealings.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •