一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php怎么运行余数 PHP中余数、取余的妙用

时间:2022-06-24 15:05:53 编辑:袖梨 来源:一聚教程网

 代码如下复制代码
  

$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'

  • ';}

      ?>

     span">

      

     if($key%3==2){echo'

  • ';}

    };

     ?>


    大家可以运行以后查看结果并分析其巧妙之处~

    热门栏目