Find the answer to your Linux question:
Results 1 to 4 of 4
How does PHP treat quotes? In PERL, I believe everything inside a single quote isn't interpreted while the double quotes are interpreted. For example, '\thello' should ouput as \thello while ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319

    quotes


    How does PHP treat quotes? In PERL, I believe everything inside a single quote isn't interpreted while the double quotes are interpreted. For example, '\thello' should ouput as \thello while "\thello" should output <tab space>hello.
    The best things in life are free.

  2. #2
    Just Joined! Sykotik's Avatar
    Join Date
    Mar 2002
    Location
    Cape Town, South Africa
    Posts
    54
    Quote Originally Posted by www.php.net
    Unlike the two other syntaxes, variables and escape sequences for special characters will not be expanded when they occur in single quoted strings.
    The "other two syntaxes" mentioned being double quoted and heredoc syntax.

  3. #3
    Just Joined!
    Join Date
    May 2003
    Posts
    24
    See... if you put: echo " Yo World... Matt Says, \"Hey\"";

    that'll give you:

    Yo World... Matt Says, "Hey"

    Does that help or am I a lost lonar?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    PHP's quotation rules are exactly like PERL's rules.
    The best things in life are free.

Posting Permissions

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