Home > Backend Development > PHP Tutorial > php指定在某个循环中插入,该如何解决

php指定在某个循环中插入,该如何解决

WBOY
Release: 2016-06-13 10:08:38
Original
1099 people have browsed it

php指定在某个循环中插入
在php循环中,指定在某个循环中插入其他,
比如:循环的结果是:A B C D E F G,想在B和C之间插入3,变成:A B 3 C D E F G
循环和插入语句怎么写?

------解决方案--------------------

探讨

可能没表达清楚,循环后的结果是这样的:
1

2

3

4

5

6

7


要在循环的结果中达到下面这样:
1

2

3

4

5

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