Re: print <<<EOF

From: Date: Wed, 29 Nov 2000 05:05:09 +0000
Subject: Re: print <<<EOF
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-27677@lists.php.net to get a copy of this message
Christian Dechery writes: > >This is available with PHP4. This works perfectly. I've tested this > >with php 3.0.9 and it doesn't work. > > > >You probably need to upgrade to a version that supports this. > > I use PHP4... I've just downloaded the latest PHP two weeks ago. > > I'm doing exactly like this > > function something($script_name) > { > echo "<form action=\"$script_name\" method=\"POST\">"; > print <<<EOF > > than I have a lot of HTML code with quotes and everything... (a whole form)... > > EOF; < it IS on the first column of text... > } > > and the parser error is on the line containing "print <<<EOF"... I've > tried > to put that on the first column as well... it simply doesn't work... > > why???? Make sure you don't have any spaces or anything after the EOF on the 'print <<<EOF' line, and, oddly enough, *nothing* after the semicolon on the *last* line. No spaces, no comments, nothing. The first bit I understand. I'm not sure why you're not allowed to have anything after the semicolon at the end. I'm told this is for a reason. Nobody's said what it is. :) -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben@netmill.fi| +----------------------------------------------------------------+

« previous php.general (#27677) next »