Re: no newline after "?>" in the resulting HTML
| From: | Richard Lynch | Date: | Mon, 20 Mar 2006 23:54:41 +0000 |
| Subject: | Re: no newline after "?>" in the resulting HTML | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-232275@lists.php.net to get a copy of this message | ||
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 ?> tags
<?php echo "Test";?>
newline
I *believe* this will output:
Test
newline
PHP only "eats" *ONE* newline after ?>, not multiple newlines,
almost-for-sure.
--
Like Music?
http://l-i-e.com/artists.htm