0
如何合併二維數組的第二個和第三個,第四個和第五個,第六個和第七個...值?第一個數組[數字]不應合併:PHP:在二維數組中合併數組
Array
(
[number] => Array
(
[0] => 1234
[1] => 2345
[2] => 3456
)
[vote01] => Array
(
[0] => 000
[1] => 000
[2] => 001
)
[vote02] => Array
(
[0] => 002
[1] => 002
[2] => 003
)
[vote03] => Array
(
[0] => 004
[1] => 004
[2] => 005
)
[vote04] => Array
(
[0] => 006
[1] => 007
[2] => 008
)
...
)
合併:
Array
(
[number] => Array
(
[0] => 1234
[1] => 2345
[2] => 3456
)
[new01] => Array
(
[0] => 000
[1] => 000
[2] => 001
[3] => 002
[4] => 002
[5] => 003
)
[new02] => Array
(
[0] => 004
[1] => 004
[2] => 005
[3] => 006
[4] => 007
[5] => 008
)
...
)
我需要以某種方式結合array_merge_recursive()
功能和foreach
環......
真棒,它完美的作品!非常感謝你! –