Source Code:
(back to article)
<?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "b" => "yellow", "c" => "red"); $result = array_intersect_assoc($array1, $array2); print_r($result); ?>
Result:
Report an issue