note 19031 deleted from function.str-replace by nlopess

From: Date: Wed, 24 Mar 2004 14:58:24 +0000
Subject: note 19031 deleted from function.str-replace by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-67102@lists.php.net to get a copy of this message
Note Submitter: brooke@jump.net ---- [Editor's note: If you think this is not what you want, consider using echo strtr('xxaxx', array('x' => 'y', 'y' => 'z')); ] 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.

« previous php.notes (#67102) next »