如果数组键在php中相同,则汇总数组值

I have been messing around with this for really long time but couldn't find a way of doing it. Any help will be much appreciated!

So I have the following array :

Array
(
[0] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 113
    )

[1] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 69
    )

[2] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 39
    )

[3] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 38
    )

[4] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 24
    )

[5] => Array
    (
        [user_agent] => iPad
        [occurrences] => 23
    )

[6] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 19
    )

[7] => Array
    (
        [user_agent] => iPhone
        [occurrences] => 12
    )

[8] => Array
    (
        [user_agent] => Windows
        [occurrences] => 4
    )

[9] => Array
    (
        [user_agent] => Macintosh
        [occurrences] => 3
    )

Desired result is something like:

Array 
(
   [user_agent]=>iPhone
   [occurrences] => //numbers added from old array where user agent is iPhone..

   .. so on with all different user_agents
)

Thanks in advance!