RE: [PHP-DEV] php eating carriage returns?
| From: | Sam Liddicott | Date: | Fri, 26 Jan 2001 16:20:40 +0000 |
| Subject: | RE: [PHP-DEV] php eating carriage returns? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-45044@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Monte Ohrt [mailto:monte@ispi.net]
> Sent: Friday, January 26, 2001 03:17
> To: php-dev@lists.php.net
> Subject: [PHP-DEV] php eating carriage returns?
>
>
> example:
> --------
>
> This is a test
>
> <? print "testing1"; ?>
> <? print "testing2"; ?>
> <? print "testing3"; ?>
>
> When I run this from the command line (4.0.5dev) I get the following
> output:
>
>
>
> This is a test
>
> testing1testing2testing3
> done.
>
>
>
> Why are there not carriage returns between the print
> statements? Is this
> an intended behavior?
Yes.
1) Its not carriage returns but <br> (and others) which start new lines for
html
2) If you want a carriage return (or linefeed as is usual) do
print "Blah\n";
to start a new line in html and text,
print "blah<br>\n";
Sam