note 26072 modified in function.str-replace by aidan
| From: | aidan@php.net | Date: | Sun, 27 Jun 2004 13:47:40 +0000 |
| Subject: | note 26072 modified in function.str-replace by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71895@lists.php.net to get a copy of this message | ||
Keep in mind that if you are trying to remove all the newlines (\n) from a fields that was submitted
in a form, you may need look for \r\n instead:
If this doesn't work:
$text=str_replace ("\n", " ", $text);
then try this:
$text=str_replace ("\r\n", " ", $text);
--was--
Keep in mind that if you are trying to remove all the newlines (\n) from a fields that was submitted
in a form, you may need look for \r\n instead:
If this doesn't work:
$text=str_replace ("\n", " ", $text);
then try this:
$text=str_replace ("\r\n", " ", $text);
http://php.net/manual/en/function.str-replace.php