note 10372 added to str_replace
| From: | whitewolf at cedar-rapids dot net | Date: | Fri, 29 Dec 2000 23:33:26 +0000 |
| Subject: | note 10372 added to str_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9203@lists.php.net to get a copy of this message | ||
It should be noted if you want to remove line breaks you have to use "\r\n" because
"\n" isn't automatically expanded
ie
$Text = ("\r\n", "<br>", $Text);
behaves like $Text = nl2br($Text); except that it also removes the line breaks putting everything in
one line of text.. this could be useful for data-base like entries
http://www.php.net/manual/function.str-replace.php