I have several 2dimensional arrays which I want to sum the values of, returning an array that has for each of its values the sum from all the others (if that makes sense?) ... Okay ... maybe an example will make it clearer! ;)
$array1 = array(array(1,1,1), array(1,1,1), array(1,1,1));
$array2 = array(array(2,2,2), array(0,0,0), array(3,3,3));
... So is there a clever / fast way to add up the values of the two arrays above to return the following array?
$array3 = array(array(3,3,3), array(1,1,1), array(4,4,4));
All I can think of doing at the moment is iterating through the values of each array and add them to a new array... which can get very slow when there are lots of arrays to add up / the arrays are bigger.
Thanks for your help!
