-2
我如何總結多維數組並保留字段並添加總和字段。我想總結一下實地計數。php總數並保留多維數組
數組是這樣的:
Array (
[0] => Array
(
[landingpage_id] => 5305bc90b7a6bb56478b4581
[offer_id] => 9233440331d06b1f22dadb1641007585
[count] => 5
)
[2] => Array
(
[landingpage_id] => 5305bc90b7a6bb56478b4581
[offer_id] => 53146a8bb7a6bb9b688b4567
[count] => 3
)
[4] => Array
(
[landingpage_id] => 5305bc90b7a6bb56478b4581
[offer_id] => 53146a8bb7a6bb9b688b4567
[count] => 2
)
)
理想的結果會是這樣,因爲它總結了數區域具有獨特的COM:
[0] => Array
(
[landingpage_id] => 5305bc90b7a6bb56478b4581
[offer_id] => 9233440331d06b1f22dadb1641007585
[count] => 5
)
[1] => Array
(
[landingpage_id] => 5305bc90b7a6bb56478b4581
[offer_id] => 53146a8bb7a6bb9b688b4567
[count] => 5
)
預期結果是什麼? –
抱歉正在修復這個問題。我一直斷線。 – Boy