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

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

WBOY
WBOYOriginal
2016-06-13 11:31:551351browse

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


小弟 刚接触PHP  各位帮帮忙哇

PHP
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