note 30155 rejected from function.str-replace by jsheets
| From: | jsheets@php.net | Date: | Sat, 08 Mar 2003 23:25:08 +0000 |
| Subject: | note 30155 rejected from function.str-replace by jsheets | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-45015@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.