note 30155 added to function.str-replace
| From: | John at rack1 dot php dot net | Date: | Sat, 08 Mar 2003 19:12:02 +0000 |
| Subject: | note 30155 added to function.str-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-45005@lists.php.net to get a copy of this message | ||
str_replace appears to take all instances of the string and replace them similteanously.
For example:
str_replace("RANDOM_NAME", $Class->GetRandomName(), $SomeString);
RANDOM_NAME will be replaced with the SAME Random Name generated from $Class->GetRandomName(),
regardless of the fact that there are 500 instances of RANDOM_NAME.
Unless theres a fix for this, I'd love to hear it.
--
http://www.php.net/manual/en/function.str-replace.php
http://master.php.net/manage/user-notes.php?action=edit+30155
http://master.php.net/manage/user-notes.php?action=delete+30155
http://master.php.net/manage/user-notes.php?action=reject+30155