PHP heredoc strings

A heredoc string is delimited by the special operator <<< followed by an identifier. The string must be closed using the same identifier, optionally followed by a semicolon, placed at the very beginning of its own line. It is used to deal with multiline text or text that spans multiple lines

Example code:

$who = "World";
echo <<<TEXT
So I said, "Hello $who"
TEXT;
Share Article/Example:
  • Facebook
  • Twitter
  • del.icio.us
  • Digg
  • DotNetKicks
  • DZone