Re: [PHP-DEV] php eating carriage returns?

2001-01-27 Thread Zeev Suraski

Yeah, it's the intended behavior - there was a discussion about it a few 
years ago...

Zeev

At 17:16 26/1/2001, Monte Ohrt wrote:
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
Zeev Suraski [EMAIL PROTECTED]
CTO   co-founder, Zend Technologies Ltd. http://www.zend.com/


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] php eating carriage returns?

2001-01-26 Thread Monte Ohrt

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DEV] php eating carriage returns?

2001-01-26 Thread Sam Liddicott



 -Original Message-
 From: Monte Ohrt [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 26, 2001 03:17
 To: [EMAIL PROTECTED]
 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 "blahbr\n";

Sam

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] php eating carriage returns?

2001-01-26 Thread Monte Ohrt

Got it. This is just causing problems with a templating system
we're working on. E-mail templates are not coming out as expected.
We'll work around it :)

Cynic wrote:
 
 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"; ?


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]