Re: echo w/ here document

From: Date: Mon, 11 Nov 2002 23:09:21 +0000
Subject: Re: echo w/ here document
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-123912@lists.php.net to get a copy of this message
You need to remove the semicolon from the beginning of your heredoc expression. The semicolon tells PHP (incorrectly) that the instruction terminates, while in fact it doesn't: <?php $name="John Doe" echo <<< ENDOFECHO; <HTML> <BODY> <H3>ECHO TEST</H3> Hello, $name. </BODY> </HTML> ENDOFECHO; ?> This will work. Marco -- ------------ php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com!

« previous php.general (#123912) next »