I have a associate array with some values in the below format, I need to sum the array based on the key values.

```
$ar = array(
    'Services' => array(
        array(
            '9' => '0',
            '10' => '0',
            '11' => '0',
            '12' => '0',
            '13' => '0',
            '14' => '0',
            '15' => '600'

        ),
    ),
    'Financial' => array(
        array(
            '9' => 0,
            '10' => 0,
            '11' => 0,
            '12' => 0,
            '13' => 0,
            '14' => 0,
            '15' => 500
        ),

        array(
            '9' => 0,
            '10' => 0,
            '11' => 0,
            '12' => 0,
            '13' => 0,
            '14' => 0,
            '15' => 200
        ),

        array(
            '9' => 0,
            '10' => 0,
            '11' => 0,
            '12' => 0,
            '13' => 0,
            '14' => 0,
            '15' => 300
        ),
    ),
    'DFD' => array(
        array(
            '9' => 0,
            '10' => 0,
            '11' => 0,
            '12' => 0,
            '13' => 0,
            '14' => 0,
            '15' => 1000,
        ),

        array(
            '9' => 0,
            '10' => 0,
            '11' => 0,
            '12' => 0,
            '13' => 0,
            '14' => 0,
            '15' => 100
        )
    )
);

```

I need to sum the array values and get the result in the following format:

```
[Services] => Array(
    [9] => 0,
    [10] => 0,
    [11] => 0,
    [12] => 0,, 
    [13] => 0, 
    [14] => 0,  
    [15] => 600 
    )
[Financial] => Array(
    [9] => 0,
    [10] => 0,
    [11] => 0,
    [12] => 0,, 
    [13] => 0, 
    [14] => 0,  
    [15] => 1000 
    )
[DFD] => Array(
    [9] => 0,
    [10] => 0,
    [11] => 0,
    [12] => 0,
    [13] => 0, 
    [14] => 0,  
    [15] => 1100 

)

```

Code I have tried so far:

```
$sum = 0; 
foreach($ar as $k=>$res2){ 
    $sum[$k][] = $res2+$sum; 
} 

```