For example:
$sql = <<<MySQL_QUERY
Thank you!
For example:
$sql = <<<MySQL_QUERY
Thank you!
It is the start of a string that uses the HEREDOC syntax.
A third way to delimit strings is the heredoc syntax: <<<.
After this operator, an identifier is provided, then a newline. The string itself follows, and then the same identifier again to close the quotation.
Its the heredoc syntax.
$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD;
That's heredoc syntax. You start a heredoc string by putting <<<
plus a token of your choice, and terminate it by putting only the token (and nothing else!) on a new line. As a convenience, there is one exception: you are allowed to add a single semicolon after the end delimiter.
Example:
echo <<<HEREDOC
This is a heredoc string.
Newlines and everything else is preserved.
HEREDOC;