Is there a clean way to accomplish the following without writing an ugly bunch of for loops and logic blocks?
<?php
//INPUT
$aRaw = [
['in' => [1,2,3], 'out' =>[4,5,6]],
['in' => [7,8,9], 'out' =>[1,2,3]]
];
//DESIRED OUTPUT
$aSum = ['in' => [8,10,12], 'out' =>[5,7,9]];
?>
$aN is a factor, so there may only be one set in $aRaw or there may be 5+
Thank you =)