tags:

views:

67

answers:

2

i remember a while ago i used a method like this to print out content so i didnt have to use slashes every time i had to use a quotation.

>> 

some text here "and more text



something;

what was that called? and how did it look

thanks

this im gonna write down :p

+6  A: 

You're talking about heredoc syntax. Example:

$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD;
karim79
YES!! thank you , thank you.. it was so blurry to remember it. lol
SarmenHB
A: 

That's PHP Heredocs. There's an example on the manual page:

<?php
class foo {
    public $bar = <<<EOT
bar
EOT;
}
?>

The heredoc starts with <<< folowed by an identifier, and ends with that same identifier followed by a semicolon. Note that the end identifier must start at the beginning of a line, and cannot be indented.

Daniel Vandersluis