嗨,请帮忙。如何总结这个数组
Array
(
[975] => Array
(
[0] => Array
(
[0] => 79.35
[1] => 14.28
)
[1] => Array
(
[0] => 79.35
[1] => 14.28
)
)
[758] => Array
(
[0] => Array
(
[0] => 16615.82
[1] => 2990.85
)
[1] => Array
(
[0] => 16615.82
[1] => 2990.85
)
[2] => Array
(
[0] => 16615.82
[1] => 2990.85
)
)
)
结果看起来像
Array
(
[975] => Array
(
[0] => Array
(
[0] => 158.7
[1] => 28.56
)
)
[758] => Array
(
[0] => Array
(
[0] => 49847.46
[1] => 8972.55
)
)
)
答案 0 :(得分:-2)
创建一个单独的数组,然后遍历嵌套数组并单独添加它们。如果你不能执行那个,那么你就不应该用PHP编写代码;)