I've just started PHP and I'm working steadily on a PHP-based site, using whatever tricks I can learn.
The other day someone informed me about heredoc syntax - wow!!
That's pretty useful rather than having to escape quotes etc.
My question is, can heredoc syntax only be used for the echo command like below...?
Code: Select all
echo <<<HTML
.....
HTML;Code: Select all
$foo = <<<HTML
all sorts of stuff here
HTML;