我有一个数组。在数组中有 2 个相同的 [id] 值。我希望能够添加这些元素的 [score] 并合并 [id] 相同的元素。这可能吗?
[0] =>
[id] => 9428
[auth] => manual
[firstname] => Tariq
[lastname] => Essop
[score] => 75.000000000
[timecreated] => 1366093740
[courseid] => 215
[itemname] => 2164 Date of assessment and dispute resolution
[itemid] => 750 )
[1] =>
[id] => 9428
[auth] => manual
[firstname] => Tariq
[lastname] => Essop
[score] => 75.000000000
[timecreated] => 1366100428
[courseid] => 215
[itemname] => 2168 Cross-border loans and intellectual property
[itemid] => 751 )
[2] =>
[id] => 6258
[auth] => manual
[firstname] => Tariq
[lastname] => Essop
[score] => 75.000000000
[timecreated] => 1366100428
[courseid] => 215
[itemname] => 2168 Cross-border loans and intellectual property
[itemid] => 752 )