Re: no newline after "?>" in the resulting HTML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux