0
拉取數據,數據是這樣的:需要幫助的PHP數組從MySQL數據從MySQL表概括
Acct # Acct Name Item Date Sold Qty Sold
10293 Company A Canon JX200 2012-06-24 1
11042 Company B Canon JX200 2012-06-05 2
12560 Company D Canon L90 2012-04-20 1
12560 Company D Canon L90 2012-05-07 1
14160 Company D Canon L90 2012-05-22 2
14168 Company C Canon L90 2012-04-20 6
我想輸出,看起來像:
Acct # Acct Name Item Mo 1 Mo 2 Mo 3 Mo 4 Mo 5 Mo 6 Tot
10293 Company A Canon JX200 1 1
11042 Company B Canon JX200 2 2
12560 Company C Canon L90 6 6
12560 Company D Canon L90 1 3 4
杆進洞2線性代數課在大學和PHP陣列讓我難住。需要將我的數據放入數組中,進行排序和總結。最大的問題(我認爲)是構建數組的代碼。提前致謝!