Home > Backend Development > PHP Tutorial > 代码-求php大神能帮写一个 循环

代码-求php大神能帮写一个 循环

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:29:43
Original
1007 people have browsed it

代码php循环class

<code> 其他大神提供个想法也行 想破脑袋了 也不行,ps 因为其他地方也要调用,所以输出div 走不通    <div>                     {foreach item=vo from=$shouji name=foo key=key}                                                    <!--{if $smarty.foreach.foo.index < 3}-->                                    <a href="category.php?id=%7B%24vo.id%7D" data="{$vo.id}">{$vo.name}</a>                            {/if}                           {/foreach}                        </div>                  <span class="line"></span>                              <div>   {foreach item=vo from=$shouji name=foo key=key}                            <!--{if  $smarty.foreach.foo.index <6 && $smarty.foreach.foo.index >=3}-->                                    <a href="category.php?id=%7B%24vo.id%7D" data="{$vo.id}">{$vo.name}</a>                            {/if}   <p>{/foreach}<br><br></p>
<pre class="brush:php;toolbar:false"><code>                        <div>                     {foreach item=vo from=$shouji name=foo key=key}                            <!--{if $smarty.foreach.foo.index <9 && $smarty.foreach.foo.index >=6}-->                                    <a href="category.php?id=%7B%24vo.id%7D" data="{$vo.id}">{$vo.name}</a>                            {/if}   <p>{/foreach}<br><br><br><br>  </p>
<pre class="brush:php;toolbar:false"><code>                            <div>                     {foreach item=vo from=$shouji name=foo key=key}                            <!--{if $smarty.foreach.foo.index <12 && $smarty.foreach.foo.index >=9}-->                                    <a href="category.php?id=%7B%24vo.id%7D" data="{$vo.id}">{$vo.name}</a>                            {/if}   <p>{/foreach}<br><br><br><br>          </p>                                    </div></code>
Copy after login
Related labels:
Previous article:php echo无法显示输出 Next article:thinkphp一个页面的form提交后,然后给指定页面返回一个值。
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template