note 19031 added to function.str-replace
| From: | brooke at jump dot net | Date: | Wed, 13 Feb 2002 18:07:51 +0000 |
| Subject: | note 19031 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26568@lists.php.net to get a copy of this message | ||
An example to illustrate the transitive property of the array substitution behaviour:
[ik@budapest www]$ php -q
<?
echo str_replace(array('x', 'y'), array('y', 'z'),
'xxaxx');
?>
zzazz
[ik@budapest www]$
This may or may not be what you want, but you should be aware of it in any case. This is on
php4.0.5.
--
http://www.php.net/manual/en/function.str-replace.php
http://master.php.net/manage/user-notes.php?action=edit+19031
http://master.php.net/manage/user-notes.php?action=delete+19031
http://master.php.net/manage/user-notes.php?action=reject+19031