ID: 36560 User updated by: gruja at phy dot bg dot ac dot yu Reported By: gruja at phy dot bg dot ac dot yu Status: Bogus Bug Type: Strings related Operating System: windows PHP Version: 5.1.2 New Comment:
I have tested similar code on bouth windows and unix. Production server is unix, and I use windows machine for developing applications. I have seen this bug first time on unix, and then again at my PC. Actualy I read string from MySQL, then try to remove \n (beacose it shold be all writen in one line for javascript) and to replace it with <br>... Previous Comments: ------------------------------------------------------------------------ [2006-02-28 17:03:29] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Windows uses \r\n not \n ------------------------------------------------------------------------ [2006-02-28 16:50:37] gruja at phy dot bg dot ac dot yu Description: ------------ I have found a bug on page function.str-replace.html [chm date: 2005-05-20]... When I wish to replace new line character it does insert instead. Reproduce code: --------------- $string="aaa bbb"; $string=str_replace("\n", "<br>", $string); print $string; Expected result: ---------------- aaa<br>bbb Actual result: -------------- aaa <br>bbb ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36560&edit=1