I basically want to change the value of a multidimensional array by adding to the previous value.
Example:
$arr=array(1,2,3);
foreach($arr as $val){
$arrTotal[1][2][3]=$val;
}
This would make $arrTotal[1][2][3]=3
What I really want is $arrTotal[1][2][3]=6
3+2+1.
I have tried an approach like so:
$arrTotal[1][2][3]+=$val;
But to no avail.