Home >Backend Development >PHP Tutorial >PHP 数组合并的有关问题

PHP 数组合并的有关问题

WBOY
WBOYOriginal
2016-06-13 11:29:21951browse

PHP 数组合并的问题
我有两个数组,分别是这样的:
Array ( [0] => 1 [1] => 1 [2] => 1 [3] => 1 [4] => 1 ) 
Array ( [0] => 4 [1] => 2 [2] => 5 [3] => 6 [4] => 7 ) 
我想把这两个数组合并,变成如下的新数组:
Array ( [1] => 4 [1] => 2 [1] => 5 [1] => 6 [1] => 7 ) 
但是,我用array_combine,但是合并以后的数组变成了Array ( [1] => 7 ) 
应该要如何操作啊?

PHP 数组 合并
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn