<?php $v_4 = [ [1, 2, 3], [4, 5, 6], ]; $v_5 = [ [7, 8, 9], [10, 11, 12], ]; foreach ($v_4 as $i => &$row) { foreach ($row as $k => &$v) { $v += $v_5[$i][$k]; } } var_export($v_4);
You have javascript disabled. You will not be able to edit any code.