私はこの配列を持っています
Array
(
[0] => Array
(
[0] => Name
[1] => Email
[2] => Address
)
[1] => Array
(
[0] => vanson
[1] => dhmax@pan.com
[2] => gurgaon
)
[2] => Array
(
[0] => john
[1] =>
[2] =>
)
[3] => Array
(
[0] => sdf
[1] => sdfsdf
[2] => sdfsd
)
)
そして私はこれが欲しい
Array
( [0] => Name
[1] => Email
[2] => Address
[0] => vanson
[1] => dhmax@pan.com
[2] => gurgaon
[0] => john
[1] =>
[2] =>
[0] => sdf
[1] => sdfsdf
[2] => sdfsd
)
そのインデックスを上書きせずに
または、動的配列を作成し、同じインデックス付きの値を個々の配列に入れたい.このようなもの
$arr_1 = array(
[0] => Name
[1] => vanson
[2] => john
[3] => sdf
)
$arr_2 = array(
[0] => Email
[1] => dhmax@pan.com
[2] =>
[3] => sdfsdf
)
$arr_3 = array(
[0] => Address
[1] => gurgaon
[2] =>
[3] => sdfsd
)
配列は、1 番目のインデックス付き配列のカウントに基づいて作成されます (例 0 番目のインデックスに 4 の配列がある場合、4 つの配列を作成する必要があります)。