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

PHP 数组合并的有关问题

WBOY
Release: 2016-06-13 11:29:21
Original
948 people have browsed it

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 数组 合并
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template