Re: strange print<<<MARK behavior

From: Date: Wed, 29 Nov 2000 13:58:07 +0000
Subject: Re: strange print<<<MARK behavior
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27813@lists.php.net to get a copy of this message
Paul Mullen [pem@nellump.com] wrote: > >of the two files attatched to this email, 'index.phtml' was working ok. > >but the part in 'index2.phtml' with the /* comments */ on it was > >apparently causing a parse-error (which the parser was reporting as > >being at the end of the document). > > This was the same parse error I was gettting until I figured out how the > "here document" construct worked. Not only do the 'print<<<TAG' > and > 'TAG;' lines have to be completely flush left (first characters on their > respective lines), but there also cannot be anything following them on > those same lines (other than the linebreak). One small correction - the 'print<<<TAG' does NOT have to be at the beginning of the line, but the ending 'TAG;' definitely does. Here's an example of mine: print <<< END_HTML <form method="post" action="/test.php"> Field 1: <input type="text" name="field_1"><BR> Field 2: <input type="text" name="field_2"><BR> <input type="submit" name="submit" value="submit"> </form> END_HTML; HTH. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com

« previous php.general (#27813) next »