我手頭有以下數組。我必須遍歷下面的數組,以便它將創建另一個數組,其索引爲每個子數組的第0個索引,位於新數組的第0個索引中,等等。在PHP中操作多維數組
當前陣列
Array
(
[0] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
[1] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
[2] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
)
所需的輸出
Array
(
[0] => Array
(
[0] => 1
[1] => 1
[2] => 1
)
[1] => Array
(
[0] => 2
[1] => 2
[2] => 2
)
[2] => Array
(
[0] => 3
[1] => 3
[2] => 3
)
)
謝謝,馬克,你讓我出去一個大爛攤子。讚賞 –