Re: echo w/ here document

From: Date: Tue, 12 Nov 2002 02:44:02 +0000
Subject: Re: echo w/ here document
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-123925@lists.php.net to get a copy of this message
Hello Marco, "Marco Tabini" <marcot@inicode.com> wrote: > 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: I think... > <?php > $name="John Doe" you meant the semicolon at the end of ENDOFECHO; (below) and NOT at the end of "John Doe"; (above) ;) - E > echo <<< ENDOFECHO; > <HTML> > <BODY> > <H3>ECHO TEST</H3> > Hello, $name. > </BODY> > </HTML> > ENDOFECHO; > ?> > > This will work. > >

« previous php.general (#123925) next »