>I need to echo a string that contains both quotes and double 
>quotes.
>
>I remember doing this once using a special construct where the 
>string started on a new line with a triple slash if I remember well. Or 
>it was a triple something...
>
>I can't find the topic in the online PHP doc...
>
>Anybody remember this construct?

You are talking about "here docs":

It's something goofy like:

<<<HERE
Blah blah blah
HERE

Either <<< or >>>

But you don't really need that...

Just use \ in front of the kind of quotes you are using on the outside part:

$foo = 'You need to use \\ in front of any \'apostrophes\' but not "quotes"
inside here';
$bar = "You need to use \\ in front of any \"quotes\" but not 'apostrophes'
inside here";



-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to