编辑:现在这是我真正的问题。 here是我的来源,但我的问题有点不同。如果数组键是相同的那么总和值。我的数组是:如何总结数组值php
Array
(
[one] => Array
(
[gozhi] => 2
[uzorong] => 1
[ngangla] => 4
[langthel] => 5
)
[two] => Array
(
[gozhi] => 5
[uzorong] => 0
[ngangla] => 3
[langthel] => 2
)
[three] => Array
(
[gozhi] => 3
[uzorong] => 0
[ngangla] => 1
[langthel] => 3
)
)
在上面的链接
,期望的结果是
Array
(
[gozhi] => 10
[uzorong] => 1
[ngangla] => 8
[langthel] => 10
)
,但我期望的结果是
Array
(
[one] => 12
[two] => 10
[three] => 7
)
我有再次更新我的答案 –