Home > Backend Development > PHP Tutorial > php 如何循环从第4条记录以后的LI class="selc"

php 如何循环从第4条记录以后的LI class="selc"

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-20 12:29:16
Original
848 people have browsed it

如题,现在这样写只能第2条li =selc
{php $j=1;}
 {loop $data $r}
 

  • {str_cut($r['catname'],12,'')}

  •  {$j++}
     {/loop} 


    回复讨论(解决方案)

     

  • =4} class="selc"{/if} href="{str_replace('http://www.','http://m.',$r[url])}">{str_cut($r['catname'],12,'')}
  • 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