NYCPHP Meetup

NYPHP.org

[nycphp-talk] heredoc help please?

Steve Manes smanes at magpie.com
Thu Jan 31 09:26:26 EST 2008


-- rada -- wrote:
> Hello all,
> 
> Can anyone help me with heredoc?
> I have this code:
> 
> <?php
> 
> echo <<<EOD
> 
> This is a heredoc test.
> 
> Test line 2.
>     Test line 3 with tab.
> 
> EOD;

print nl2br(
<<<EOD
Here
are
four
lines.
EOD
);

(Note: the close parens needs to be on its own line)



More information about the talk mailing list