note 96096 deleted from function.str-replace by danbrown
| From: | danbrown@php.net | Date: | Mon, 08 Feb 2010 20:04:05 +0000 |
| Subject: | note 96096 deleted from function.str-replace by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165764@lists.php.net to get a copy of this message | ||
Note Submitter: luc at databoss dot nl
----
A updated version:
<?php
function str_replace_assoc($array,$string){
return str_replace(
array_keys($array),
array_values($array),
$string
);
}
?>