[Solved] How to sum the values of an associative array?


try this way, i hope it works:

foreach($array as $key => $value){
     $sum = 0;
     foreach($value['addition_price'] as $v){
          $sum += $v;
     }
     $array[$key] = $sum;
 }

0

solved How to sum the values of an associative array?