note 91611 added to function.echo

From: Date: Fri, 19 Jun 2009 09:58:51 +0000
Subject: note 91611 added to function.echo
Groups: php.notes 
Request: Send a blank email to php-notes+get-157118@lists.php.net to get a copy of this message
This is obvious, but is not mentioned in the doc: the "here document" syntax will produce an error if the END tag is not in the first column. ie, if (...) { echo <<<END This uses the "here document" syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a line with just a semicolon. no extra whitespace! END; } ...will not work, make sure END is on column 1 (ugly as that is, indentation-wise): if (...) { echo <<<END This uses the "here document" syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a line with just a semicolon. no extra whitespace! END; } ---- Server IP: 69.147.83.197 Probable Submitter: 41.243.203.60 (proxied: 196.23.181.69) ---- Manual Page -- http://www.php.net/manual/en/function.echo.php Edit -- https://master.php.net/note/edit/91611 Del: integrated -- https://master.php.net/note/delete/91611/integrated Del: useless -- https://master.php.net/note/delete/91611/useless Del: bad code -- https://master.php.net/note/delete/91611/bad+code Del: spam -- https://master.php.net/note/delete/91611/spam Del: non-english -- https://master.php.net/note/delete/91611/non-english Del: in docs -- https://master.php.net/note/delete/91611/in+docs Del: other reasons-- https://master.php.net/note/delete/91611 Reject -- https://master.php.net/note/reject/91611 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#157118) next »