I'm new to PHP and don't understand what the point of <<<_END
is. Could someone please explain when this should be used? I've looked at various examples and they all seem to have HTML embedded within them. But I can use HTML without the <<<_END
tags, so why should I use them? I tried searching the manual, but I keep finding the end()
method for arrays.
It's the start of a heredoc. you can do:
$data = <<< _END
You can write anything you want in between the start and end
_END;
_END
can be just about anything. You could put EOF
or STUFF
. as long as you use the same thing at the start and the finish.