0
可能重複:
Elegant way to merge two arrays as key value pairs in PHP?結合兩個數組
我有兩個數組:
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
[4] => E
)
Array
(
[0] => APPLE
[1] => BANANNA
[2] => CRANBERRY
[3] => DURIAN
[4] => EGGPLANT
)
我想將它們結合起來,使第一個數組的第一個值將是第二個數組的第一個鍵。
Array
(
[A] => APPLE
[B] => BANANNA
[C] => CRANBERRY
[D] => DURIAN
[E] => EGGPLANT
)