note 10713 added to str_replace
| From: | kholland at tekinsight dot com | Date: | Thu, 18 Jan 2001 18:43:27 +0000 |
| Subject: | note 10713 added to str_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9933@lists.php.net to get a copy of this message | ||
<pre>
PHP has a bug in it, when you
do:
while (list ($key, $val) = each ($array)) {
$val = str_replac('"',$val,'""');
$output .= "\"$val\"" . ",";
}
If the array is 1,2,3, the output should be 1,2,3 because each array element contains no double
quotes.. But the output contains 11,22,33 ..
Sounds like a special case of your string object that your string handling functions don't
handle..
</pre>
http://www.php.net/manual/en/function.str-replace.php