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

php操作数组解决思路

WBOY
Release: 2016-06-13 12:42:39
Original
777 people have browsed it

php操作数组

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


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 />
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