note 97617 deleted from function.array-replace by danbrown
| From: | danbrown@php.net | Date: | Wed, 28 Apr 2010 14:51:40 +0000 |
| Subject: | note 97617 deleted from function.array-replace by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168755@lists.php.net to get a copy of this message | ||
Note Submitter: ozana at omdesign dot cz
----
<?php
if (!function_exists('array_replace'))
{
function array_replace(array &$array, array &$array1)
{
$intersect = array_intersect_key($array1, $array);
return array_merge(array_diff_key($array, $intersect), $intersect);
}
}
?>