<?php $arr1 = array('9' => '4.08', '10' => '0.10', '11' => '4.08', '12' => '0.01'); $arr2 = array('8' => '0.01', '10' => '0.01', '11' => '0.01'); $arr3 = $arr1 + $arr2; $arr4 = array_intersect_key($arr2, $arr1); foreach($arr4 as $k => $v) { $arr3[$k] += $v; } print_r($arr3);