Urb LeJeune wrote:
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.

In "classic" heredoc syntax, \nTOKEN is treated by the parser as the end-of-doc token, not just TOKEN. In Perl, it's \nTOKEN\n. This actually comes in handy for CLI scripts were you want to use it dump a bunch of text with a closing prompt:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent est libero, rutrum in, viverra vehicula, consequat non, ante. Praesent nibh arcu, congue ac, bibendum eget, consequat vel, nunc. Nullam fermentum cursus magna. Nulla egestas justo vel ipsum. Sed vitae lectus in ipsum tristique ullamcorper.

Would you like to play a game of chess (y/n)? _

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to