Re: php eating carriage returns?
| From: | Cynic | Date: | Fri, 26 Jan 2001 16:29:02 +0000 |
| Subject: | Re: php eating carriage returns? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-45045@lists.php.net to get a copy of this message | ||
yes, this is as per the manual. the (optional) newline after
a closing PHP tag ( ?> ) is considered to be a part of the
tag, and is removed from the output.
use
<? print "testing1\n"; ?>
<? print "testing2\n"; ?>
<? print "testing3\n"; ?>
or
<? print "testing1"; ?>
<? print "testing2"; ?>
<? print "testing3"; ?>
At 16:16 26.1. 2001, Monte Ohrt wrote the following:
--------------------------------------------------------------
>example:
>--------
>
>This is a test
>
><? print "testing1"; ?>
><? print "testing2"; ?>
><? print "testing3"; ?>
>
>done.
>
>
>
>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?
>
>Monte
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
>For additional commands, e-mail: php-dev-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz