Re: [PHP] no newline after ? in the resulting HTML

2006-03-21 Thread Rostislav Krasny
On Mon, 20 Mar 2006 17:51:32 -0600 (CST) [EMAIL PROTECTED] (Richard Lynch) wrote: On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote: pHello World/p /body pHello World/p/body Why there is no newline afer pHello World/p ? Is it a PHP bug or the tutorial should be updated?

Re: [PHP] no newline after ? in the resulting HTML

2006-03-21 Thread Andrei
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 Rostislav Krasny wrote: On Mon, 20 Mar 2006 17:51:32 -0600 (CST) [EMAIL PROTECTED] (Richard Lynch) wrote: On Sat, March 18,

Re: [PHP] no newline after ? in the resulting HTML

2006-03-21 Thread Rostislav Krasny
On Tue, 21 Mar 2006 10:38:47 +0200 [EMAIL PROTECTED] (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,

Re: [PHP] no newline after ? in the resulting HTML

2006-03-20 Thread Richard Lynch
On Sat, March 18, 2006 12:36 pm, Rostislav Krasny wrote: pHello World/p /body pHello World/p/body Why there is no newline afer pHello 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]

Re: [PHP] no newline after ? in the resulting HTML

2006-03-20 Thread Richard Lynch
On Sat, March 18, 2006 1:23 pm, Adrian wrote: Is there a way to circumvent this? My template engine compiles templates to PHP files and this feature makes the output html code look awful sometimes. You could: 1. Add \n after all the lines of output where it matters. 2. Use TWO newlines after

RE: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Brady Mitchell
Why there is no newline afer pHello World/p ? Is it a PHP bug or the tutorial should be updated? The tutorial is fine. The sample code mentioned: html head titlePHP Test/title /head body ?php echo 'pHello World/p'; ? /body /html Contains a line break after the pHello World/p is

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Rasmus Lerdorf
Brady Mitchell wrote: Why there is no newline afer pHello World/p ? Is it a PHP bug or the tutorial should be updated? The tutorial is fine. The sample code mentioned: html head titlePHP Test/title /head body ?php echo 'pHello World/p'; ? /body /html Contains a line break after the

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Adrian
Is there a way to circumvent this? My template engine compiles templates to PHP files and this feature makes the output html code look awful sometimes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Rasmus Lerdorf
Adrian wrote: Is there a way to circumvent this? My template engine compiles templates to PHP files and this feature makes the output html code look awful sometimes. Nope. Put in an extra newline after ? if you need them, or put a \n at the end of the last echo inside the PHP block.

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Chris Shiflett
Rostislav Krasny wrote: Why there is no newline afer pHello World/p? Is it a PHP bug or the tutorial should be updated? I discuss this here: http://shiflett.org/archive/151 It's a feature of PHP that has some advantages and disadvantages, and it's not likely to change (consistency has merit,

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Jim Lucas
Rostislav Krasny wrote: Hi, I've tried to ask the following question on internals@lists.php.net but has been pointed out that that mailing list isn't appropriate. So I'm resinding it here. I am a newbie to PHP. I've installed a php5-cgi-5.1.2_1 from FreeBSD ports collection and access it by

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Rostislav Krasny
On Sat, 18 Mar 2006 13:49:19 -0800 [EMAIL PROTECTED] (Jim Lucas) wrote: put a space after the ? and you will retain the line feed It also adds that space before the retained line feed, but so it looks better anyway. Excellent suggestion, thank you! Could it be added to the FAQ and to the

Re: [PHP] no newline after ? in the resulting HTML

2006-03-18 Thread Rasmus Lerdorf
Rostislav Krasny wrote: On Sat, 18 Mar 2006 13:49:19 -0800 [EMAIL PROTECTED] (Jim Lucas) wrote: put a space after the ? and you will retain the line feed It also adds that space before the retained line feed, but so it looks better anyway. Excellent suggestion, thank you! Could it be added