ID: 35441 User updated by: shri_phadte at yahoo dot co dot in Reported By: shri_phadte at yahoo dot co dot in Status: Bogus -Bug Type: Strings related +Bug Type: *General Issues Operating System: Windows/Linux PHP Version: 5.1.0 New Comment:
Thanks Tony !! Previous Comments: ------------------------------------------------------------------------ [2005-11-28 12:24:25] [EMAIL PROTECTED] Yeah, on *nix newline is "\n", on Windows it's "\r\n" and on Mac it's "\r". Use PHP_EOL constant for that. ------------------------------------------------------------------------ [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