Home > Backend Development > PHP Tutorial > 求教怎么合并数组

求教怎么合并数组

WBOY
Release: 2016-06-13 12:43:26
Original
849 people have browsed it

求教如何合并数组

<br />
//比如下面两个数组<br />
$a1=array(2=>array(1,2),3=>array(4));<br />
$a2=array(2=>array(5),5=>array(4));<br />
/**<br />
*我想$a1跟$a2合并的结果为 array(2=>array(1,2,5),3=>array(4),5=>array(4));<br />
**/<br />
Copy after login

有什么好的方法?

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