我有关联数组(动态 - 可能有更多数组,但键相同):
Array
(
[food] => Array
(
[0] => 3
[1] => 4
[2] => 1
)
[liquor] => Array
(
[0] => 4
[1] => 5
[2] => 0
)
[beer] => Array
(
[0] => 5
[1] => 6
[2] => 0
)
)
我需要在每个数组上使用array_sum,因此结果为:
Array ( [food] => 8, [liquor] => 9, [beer] => 11 )
谢谢!