您可以通过以下代码实现:
$array1 = array("Jan" => "0", "Feb" => "0", "Mar" => "0", "Apr" => "0"); $array2 = array("Jan" => "2", "Mar" => "3"); $array3 = array_replace($array1, $array2); print_r($array3);