Home > Backend Development > PHP Tutorial > PHP 改变循环中的值,该如何解决

PHP 改变循环中的值,该如何解决

WBOY
Release: 2016-06-13 11:31:55
Original
1357 people have browsed it

PHP 改变循环中的值

 foreach($array as $key=>&$value){<br />            //如果 $value 也是一个数组<br />            //我要拆分 $value  例如足够拆分2此<br />           $result = array_slice($value,0,3);<br />           //下次循环 的<br />            $value =  array_slice($value,3);<br /><br />            //问:  怎么是下次循环数组为  array_slice($value,3);<br />        }
Copy after login


小弟 刚接触PHP 各位帮帮忙哇
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