"apple", "b"=>"ball", "c"=>"cat", "dog"); $array2 = array("a"=>"apricot", "b"=>"banana"); // Computing the intersection $result = array_intersect_key($array1, $array2); print_r($result); ?>