Array
(
[Sum_1] => Array
(
[0] => Array
(
[e] => 1000001
[u] => Test1
[a] => 775.00
)
[1] => Array
(
[e] => 26
[u] => Test2
[a] => 555.00
)
)
[Sum_2] => Array
(
[0] => Array
(
[e] => 1000001
[u] => Test1
[a] => 110.00
)
)
[Sum_3] => Array
(
[0] => Array
(
[e] => 1000001
[u] => Test1
[a] => 444.00
)
)
)
我想将上面的数组转换为下面的东西。我需要使用 foreach 还是 array_sum 可以这样做?
Array
(
[Sum_1] => 1330.00
[Sum_2] => 110.00
[Sum_3] => 444.00
)
(我想得到每个名为 Sum_1、Sum_2、Sum_3 的部分的元素 [a] 的总和)感谢您的帮助!