$arr1 = array("color1" => "red", "color2" => "blue"); $arr2 = array("color1" => "black", "color3" => "green"); $arr3 = $arr1 + $arr2; //result is array("color1" => "red", "color2" => "blue", "color3" => "green");