ID:               35441
 Updated by:       [EMAIL PROTECTED]
 Reported By:      shri_phadte at yahoo dot co dot in
-Status:           Open
+Status:           Bogus
 Bug Type:         Strings related
 Operating System: Windows/Linux
 PHP Version:      5.1.0
 New Comment:

Yeah, on *nix newline is "\n", on Windows it's "\r\n" and on Mac it's
"\r".
Use PHP_EOL constant for that.


Previous Comments:
------------------------------------------------------------------------

[2005-11-28 12:17:05] shri_phadte at yahoo dot co dot in

Description:
------------
When I want to replace newline in a string i use str_replace but for
Linux i have to code search string as '\n' which is fine but for
windows I have to actually press "Enter" in the string to search for
and replace a newline in the String. This Happens For The Data Which
Have Been Entered Through a HTML Form
eg For Linux
str_replace("\n"," ",$String);

& For Windows
str_replace("
"," ",$String);
Note :after str_replace(" I have actually pressed "Enter" Button on the
keyboard



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35441&edit=1

Reply via email to