PHPforeach()跳出本次或当前循环与终止循环方法

PHP中用foreach()循环中,想要在循环的时候,当知足某个条件时,想html $arr = array('a','b','c','d','e'); $html = ''; foreach($arr as $key => $value){ if($value=='b'){ $html .= $value; continue; // 当 $value为b时
相关文章
相关标签/搜索