<?php $arrays = [[0,"A" => 176000], [0, "b" => 500], [0, 3960000, 200], [10, 500, 200]]; foreach($arrays as $sub){ foreach($sub as $key => $num){ if(!isset($new[$key])) $new[$key] =0; $new[$key] += $num; } } var_dump($new);
You have javascript disabled. You will not be able to edit any code.