NYCPHP Meetup

NYPHP.org

[nycphp-talk] heredoc help please?

Urb LeJeune urb at e-government.com
Thu Jan 31 12:55:45 EST 2008


>>>print nl2br(
>>><<<EOD
>>>Here
>>>are
>>>four
>>>lines.
>>>EOD
>>>);
>>Doesn't the closing EOD need a trailing ";"?
>
>The closing parenthesis apparently takes care of the statement 
>closure.  Actually, I believe adding one will throw an error.

         You are absolutely correct. I don't understand why however 
:-) The here doc structure is
a parameter for the function nl2br and as such I would think should 
be self containing.
         BTW there is no <br /> after "lines." The fact that there is 
no nl following the last line of
the document has always been a mystery to me. PHP supposedly allows 
white spaces in most
places. I could also never understand why spaces are not allowed 
after the opening or closing
label.

Urb

Urb

Dr. Urban A. LeJeune, President
E-Government.com
609-294-0320  800-204-9545
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E-Government.com lowers you costs while increasing your expectations.





More information about the talk mailing list