Re: [SMARTY] Newline being inserted after plugin
| From: | Josh Trutwin | Date: | Wed, 10 Oct 2007 14:24:51 +0000 |
| Subject: | Re: [SMARTY] Newline being inserted after plugin | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13773@lists.php.net to get a copy of this message | ||
On Wed, 10 Oct 2007 09:03:35 -0500
Monte Ohrt <monte@ohrt.com> wrote:
> A new line is created after the ?> because PHP eats the newline.
>
> So, this (foo outputs 'FOO'):
>
> TEST"{foo}"TEST
>
> is compiled to:
>
> TEST"<?php echo foo(array(), $this);?>
> "TEST
>
> (see the newline inserted)
>
> And the final output:
Final output in the cache .php file or in the browser? If this is
how it should appear in the cached php I'm not seeing this -
the .php cache has what you have above with a newline after ?>.
> TEST"FOO"TEST
>
> (no newline)
Thanks - but what do I do to not get a php fatal error when the
template is rendered?
Josh