note 13633 added to function.str-replace.php
| From: | gee_sucka_foo at hotmail dot com | Date: | Mon, 25 Jun 2001 17:30:45 +0000 |
| Subject: | note 13633 added to function.str-replace.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14645@lists.php.net to get a copy of this message | ||
I noticed that str_replace("\r\n", "", $string) or str_replace("\n",
"", $string) will not remove line breaks if the line break is at the end of the string.
(This is with PHP version 4.0.3pl1 on Windows NT server 4.0)
ex: $string = "This is text\n";
http://www.php.net/manual/en/function.str-replace.php