note 8214 deleted from function.str-replace by philip
| From: | philip@php.net | Date: | Mon, 04 Feb 2002 12:39:33 +0000 |
| Subject: | note 8214 deleted from function.str-replace by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-26205@lists.php.net to get a copy of this message | ||
[Editor's note: see trim(), and chop() instead of these workarounds]
johnf@aztech-cs.com asked:
Is there a way to remove all new lines from a string?
str_replace("\n","",$string); doesn't seem to do anything at all.
-------------------------------------
If you are replacing text say from a web form or something try adding this one:
str_replace("\r","",$string);