另一個陣列有兩個數組:插入一個數組導致多維arrray
$arr1 = array
(
[0] => A
[1] => B
[2] => C
[3] => D
)
$arr2 = array
(
[0] => d
[1] => e
[2] => f
)
我想打一個多維數組會是這個樣子:
$arr3 = array
(
[0] => A => array
(
[0] => d
[1] => e
[2] => f
)
[1] => B
[2] => C
[3] => D
)
我想第一個數組的值應該是第二個數組的關鍵。
是的,它一個惡作劇。雖然像這樣'$ arr3 [0] = array($ arr3 [0] => $ arr2)'不需要知道第一個數組的選定位置的值。謝啦! – mindSurf