代码如下 | 复制代码 |
$ary=array("name","egineer","sonny","tonny","pingk","apple","phone","clone","pink","colle"); foreach($aryas$key=>$value){ $key=$key+1; if($key%2==1){echo' ?>
if($key%2==0){echo' }; ?> |
second_one
代码如下 | 复制代码 |
$ary=array("name","egineer","sonny","tonny","pingk","apple","phone","clone","pink","colle"); foreach($aryas$key=>$value){ $key=$key; if($key%3==0){echo' ?>
if($key%3==2){echo' }; ?> |
大家可以运行以后查看结果并分析其巧妙之处~