我想創建中,我可以通過一個記錄集這是一個數組的函數,然後它會排隊的所有制造商在一個國家,並返回重做的陣列陣列得到相同的記錄
我的記錄集是
[0] => Array
(
[Cars] => Array
(
[Manufecturer] => Honda
[MID] => 584
)
[Chracterstics] => Array
(
[Country] => Japan
)
)
[1] => Array
(
[Cars] => Array
(
[Manufecturer] => Toyota
[MID] => 531
)
[Chracterstics] => Array
(
[Country] => Japan
)
)
[2] => Array
(
[Cars] => Array
(
[Manufacturer] => KIA
[MID] => 532
)
[Chracterstics] => Array
(
[Country] => Korea
)
)
[3] => Array
(
[Cars] => Array
(
[Manufacturer] => BMW
[MID] => 534
)
[Chracterstics] => Array
(
[Country] => Germany
)
)
[4] => Array
(
[Cars] => Array
(
[Manufacturer] => Mercedece
[MID] => 543
)
[Chracterstics] => Array
(
[Country] => Germany
)
)
[5] => Array
(
[Cars] => Array
(
[Manufacturer] => SAAB
[MID] => 523
)
[Chracterstics] => Array
(
[Country] => Sweden
)
)
在理想的情況下,我會得到一個數組。
編輯 例如
[Japan] => Array
(
[0] => Array(
[Manufacturer] => Honda
)
[1] => Array(
[Manufacturer] => Toyota
)
)
[Sweden] => Array
(
[0] => Array(
[Manufacturer] => SAAB
)
)
感謝
請說明你想要的結果看起來像。 – deceze
>在理想的情況下,我會得到一個數組它不清楚你在問什麼,因爲你已經有了數組中的數據。如果您可以準確地告訴我們您正在尋找的結果,我們可能會提供更多幫助。另外,您從哪裏獲得記錄集,例如你在數據庫上運行查詢嗎?如果是這樣,查詢是什麼,因爲通過您的SQL查詢可能會更有效。 – FluffyKitten
嗯,我想我只是需要重新安排該記錄集meanning越來越像 [瑞典] =>陣列 ( [0] =>陣列([生產企業] =>薩博) ) – Autolycus