Alternative way to write string literals in PHP? (without ' or \")
What could I use in php in place of the normal ' and " symbols around something? Example: echo("Hello World!") Thanks! There are 4 ways to encapsulate strings, single quotes ' , double quotes " , heredoc and nowdoc . Read the full php.net article here . Heredoc 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. http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc $str = <<<EOD Example of string