我有这个数组
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
)
数组是根据第一个索引数组的计数创建的。(例如,如果第 0 个索引有 4 个数组,则应创建 4 个数组。)