[sf-perl] PHP line-ending question
Herb Rubin
herbr at pfinders.com
Sun Mar 5 12:09:59 PST 2006
The output in the browser would look like that without <br> in between.
Try
print $a . "\n";
to get what you want.
Herb
On Sat, 2006-03-04 at 23:48, Rich Morin wrote:
> I have some PHP code that looks like this:
>
> <? $a = 'some text';
> $b = 'more text.';
> ?>
>
> This is <?= $a ?>.
> This is <?= $b ?>
> That's enough...
>
> I would expect the output to look like this:
>
> This is some text.
> This is more text.
> That's enough...
>
> Instead, it looks like this:
>
> This is some text.
> This is more text. That's enough...
>
> FYI:
>
> % php -v
> PHP 4.4.1 (cli) (built: Feb 7 2006 06:26:45)
> ...
>
> Is this a bug or a feature?
>
> -r
--
Herb Rubin Pathfinders Software
herbr at pfinders.com http://www.pfinders.com
phone: 650-343-4571 fax: 650-343-4675
More information about the SanFrancisco-pm
mailing list