我想劃分給定的數組下方並將其存儲在不同的變量中。例如,$ array1,$ array2,$ array3.Any help將不勝感激。將數組拆分爲多個數組並將其存儲在不同的變量中
Array
(
[0] => Array
(
[0] => PVTHR05L006
[1] => PVTHR05L004
[2] => PVTS1K05L004
)
[1] => Array
(
[0] => PVTHR05L004
)
[2] => Array
(
[0] => PVTHR05L006
[1] => PVTHR05L004
[2] => PVTSK05L008
)
)
我的預期輸出是
$array1 = Array
(
[0] => PVTHR05L006
[1] => PVTHR05L004
[2] => PVTS1K05L004
); $array2 = Array
(
[0] => PVTHR05L004
); $array3 = Array
(
[0] => PVTHR05L006
[1] => PVTHR05L004
[2] => PVTSK05L008
);
預期產量是多少?編碼時你究竟在哪裏被卡住了? – Rizier123
@Akhil加入問題,不作爲註釋 – Thamilan
爲什麼不試試:'$ array1 = $ mainArr [0]'等等。 –