Home  >  Article  >  Backend Development  >  destoon实现调用自增数字从1开始的方法_php实例

destoon实现调用自增数字从1开始的方法_php实例

WBOY
WBOYOriginal
2016-06-07 17:16:44877browse

本文示例讲述了destoon实现调用自增数字从1开始的方法,在进行数据调用的时候有一定的实用价值。希望对大家的destoon开发有所帮助。具体方法如下:

示例功能:destoon 调用自增数字 从1开始。

具体代码如下:

<!--{php $tags=tag("moduleid=14&length=46&condition=status=3&pagesize=10&order=hits desc&template=null");}--> 
               
{loop $tags $k $t}  
 <li>{php $k = ++$k;}  
   <a href="{$t[linkurl]}" rel="external nofollow" target="_blank" class="item"> 
     <span class="num">{$t[hits]}</span>  
     <i class="icon icon2">{$k++}</i>    
     <span class="txt f-ib f-thide">{$t[title]}</span> 
   </a>              
 </li>
{/loop}
Statement:
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