On Tue, 21 Mar 2006 10:38:47 +0200 phplist@xxxxxxxxxxxx (Andrei) wrote: > Really I think it would be loosing time documenting that you can put a > new line after ?>! > I mean it's obvious that what's outside php tags will be printed rite? > > Andy You can put anything after "?>" but if you put a newline, that newline is then deleted from the resulting HTML. If you put a space and a newline after that space, both will not be deleted. That is all. P.S. could you not top-post, please. > Rostislav Krasny wrote: > > On Mon, 20 Mar 2006 17:51:32 -0600 (CST) > > ceo@xxxxxxxxx ("Richard Lynch") wrote: > > > >> On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote: > >>> <p>Hello World</p> > >>> </body> > >>> <p>Hello World</p></body> > >>> Why there is no newline afer " <p>Hello World</p>" ? > >>> Is it a PHP bug or the tutorial should be updated? > >> The tutorial is imprecise, and glosses over this detail. > >> > >> For very good reasons, ?>[newline] ignores the trailing [newline] > >> character. > >> > >> If you want the newline, you should do: > >> > >> <?php > >> echo "<p>Hello World</p>\n"; > >> ?> > > > > Thanks for replying. You're suggesting an obvious but not so handy > > workaround of this feature. Jim Lucas, in his reply, pointed me out to > > much easier one. He suggested just to add a space after the "?>". I'm > > wondering why this trivial thing isn't known to all and wasn't well > > documented. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php