Re: syntax question...
| From: | bahwi | Date: | Wed, 13 Nov 2002 01:59:15 +0000 |
| Subject: | Re: syntax question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124131@lists.php.net to get a copy of this message | ||
There are typically called a 'heredoc' or 'here document'. basically it changes the double quotation mark(") to
'content' (in this case). To start, do this <<<content
and to end it just type content;
on a line by itself.
The example you showed does echo the stuff out. It sets all the internal html to $var and echo's $var afterwards.
Hope this helps!
--Joseph Guhlin
http://www.bahwi.cc/
Web Developer / Unix Consultant
Kelly Meeks wrote:
I saw this used in a script, but after a couple of searches didn't come up with anything on php.net. <? $var=<<<content <table> <tr> <td> <font color="red"> $phpvarhere </font> </td> </tr> </table> content; echo $var; ?> So, does this allow you to output mixed html/php without having to escape offending characters with no echo or print? Conceptually, would the syntax above work? TIA Kelly