note 91611 deleted from function.echo by danbrown
| From: | danbrown@php.net | Date: | Fri, 19 Jun 2009 12:13:20 +0000 |
| Subject: | note 91611 deleted from function.echo by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157122@lists.php.net to get a copy of this message | ||
Note Submitter: Henry Combrinck
----
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;
}