note 14039 added to function.str-replace.php
| From: | michavanderpoel at hotmail dot com | Date: | Sat, 14 Jul 2001 13:29:47 +0000 |
| Subject: | note 14039 added to function.str-replace.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15372@lists.php.net to get a copy of this message | ||
I have trouble when replacing <br> from a MySQL query to \n.
$result = mysql($db_name, "select text from table") or die("Error connecting
database");
$text = str_replace("<br>", "\n", $text);
echo mysql_result($result, 0 ,"text");
doesn't work.
http://www.php.net/manual/en/function.str-replace.php