我有一個看起來像這樣的數組數據:轉換複雜的數值數組關聯數組
Array (
[0] => Array (
[0] => Name:
[1] => John W.
[2] => Registration ID:
[3] => 36
)
[1] => Array (
[0] =>Age:
[1] => 35
[2] => Height:
[3] => 5'11"
)
[3] => Array (
[0] => Sex:
[1] => M
[2] => Weight:
[3] => 200lbs
)
[4] => Array (
[0] => Address
)
[5] => Array (
[0] => 6824 crestwood dr delphi, IN 46923
))
我想將其轉換爲關聯數組是這樣的:
Array(
['Name']=> John W.
['Registration ID']=> 36
['Age']=> 35
['Height'] => 5'11''
['Sex']=>M
['Weight']=>200lbs
['Address']=>6824 crestwood dr delphi, IN 46923
)
我不知道在所有如何做到這一點,因爲應該是數組列標題也順序,所以它很難轉換這個數組。
任何幫助我明白,thx。
非常感謝你的工作。爲什麼我不能想出這個簡單的方法? Thx再次。 – teakay
不客氣! :-) – Nelson