From:             pperna at centrum dot cz
Operating system: Windows 2000
PHP version:      4.3.11
PHP Bug Type:     Output Control
Bug description:  New line problem

Description:
------------
I find out that PHP has big differencies between
" and '(on PHP website, I think). It is very important and many newbies
are very confused.I wanted to find some solution for inserting new line
into text documents produced by PHP.I found tons of questions about new
line feeds doesnt work for me.But solution is very easy.

YOU HAVE TO DO : $output = "text\r\n";
INSTEAD OF $output = 'text\r\n';

Reproduce code:
---------------
$output2 = 'textfirst\r\ntextsecond';



Expected result:
----------------
textfirst
textsecond

Actual result:
--------------
textfirsttextsecond

-- 
Edit bug report at http://bugs.php.net/?id=33848&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33848&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33848&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33848&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33848&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33848&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33848&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33848&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33848&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33848&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33848&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33848&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33848&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33848&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33848&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33848&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33848&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33848&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33848&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33848&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33848&r=mysqlcfg

Reply via email to