destoon implements methods that call self incrementing numbers starting from 1

  • 2021-07-16 01:58:04
  • OfStack

This article describes the example of destoon to realize the method of calling self-increasing numbers from 1, which is of practical value when calling data. I hope it will be helpful for everyone to develop destoon. The specific methods are as follows:

Example function: destoon call self-increasing number starts with 1.

The specific code is as follows:


<!--{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}

Related articles: