Home >Backend Development >PHP Tutorial >php操作数组解决思路

php操作数组解决思路

WBOY
WBOYOriginal
2016-06-13 11:28:40761browse

php操作数组

<br />for($i=1;$i<=5;$i++){<br />	array(array($i));<br />}<br />


for循环里面的是一个二维数组,我想把for循环里面的二维数组进行合并,打印出来的结果是:

<br /><br />array(<br /><br /> [0] => Array<br />        (<br />      [0] => 1<br />     )<br /> [1] => Array<br />        (<br />      [0] => 2<br />       )<br /> [2] => Array<br />        (<br />      [0] => 3<br />      )<br /> [3] => Array<br />        (<br />      [0] => 4<br />  )<br /><br /> [4] => Array<br />        (<br />       [0] => 5<br />       )<br />)<br />

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