I was wondering if there was a function that would merge two or more arrays but would ignore any key value which is not contained with in the first/base array.
Here is a quick example of what I am doing with the current result and the result I am looking for.
<?php
$array1 = array('a' => 1, 'b' => 2);
$array2 = array('b' => 3, 'c' => 4);
$result = array_merge($array1, $array2);
// current result
// $result = array('a' => 1,'b' => 3, 'c' => 4);
// what i would like
// $result = array('a' => 1,'b' => 3);
?>