配列をPHPのarray_merge、array_push、array_merge_recursiveを使ってマージした出力結果は以下の通りです。
array_merge マージ出力結果
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
[4] => E
[5] => F
)
Array
(
[no] => 2
[sei] => suzuki
[mei] => ziro
[sex] => women
[todofuken] => tokyo
[city] => yokohama
)
array_push マージ出力結果
Array
(
[0] => A
[1] => B
[2] => C
[3] => Array
(
[0] => D
[1] => E
[2] => F
)
)
Array
(
[no] => 1
[sei] => yamada
[mei] => taro
[sex] => men
[todofuken] => tokyo
[0] => Array
(
[no] => 2
[sei] => suzuki
[mei] => ziro
[sex] => women
[city] => yokohama
)
)
array_merge_recursive マージ出力結果
Array
(
[0] => A
[1] => B
[2] => C
[3] => D
[4] => E
[5] => F
)
Array
(
[no] => Array
(
[0] => 1
[1] => 2
)
[sei] => Array
(
[0] => yamada
[1] => suzuki
)
[mei] => Array
(
[0] => taro
[1] => ziro
)
[sex] => Array
(
[0] => men
[1] => women
)
[todofuken] => tokyo
[city] => yokohama
)