note 52969 rejected from function.str-replace by betz
| From: | betz@php.net | Date: | Thu, 19 May 2005 10:10:50 +0000 |
| Subject: | note 52969 rejected from function.str-replace by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-89630@lists.php.net to get a copy of this message | ||
Note Submitter: klubov at mail dot ru
----
Why this example will output " b a " instead of " b b "?
<?php
$search = " a ";
$replace = " b ";
$subject = " a a ";
echo str_replace($search, $replace, $subject);
?>