我有以下格式的数组。我想要整个数组中“金额”列的总和,这样它会给我 $sum = 150(这是 [PaymentLine][0]['Amount'] + [PaymentLine][1]['Amount'] 的总和) . 我的演示代码是
[PaymentLine] => Array
(
[0] => Array
(
[LineNo] => 2
[AccountID] => 68
[Amount] => 100
[RevisionNumber] => 1
)
[1] => Array
(
[LineNo] => 1
[AccountID] => 15
[Amount] => 50
[RevisionNumber] => 1
)
)
谁能建议我实现这一目标的正确方法?