Home > Backend Development > PHP Tutorial > destoon implements the method of calling the self-increasing number starting from 1, destoon_PHP tutorial

destoon implements the method of calling the self-increasing number starting from 1, destoon_PHP tutorial

WBOY
Release: 2016-07-13 10:20:29
Original
897 people have browsed it

destoon implements the method of calling the self-increasing number starting from 1, destoon

The example in this article describes the method of calling destoon to increase the number starting from 1, which has certain practical value when making data calls. I hope it will be helpful to everyone's destoon development. The specific method is as follows:

Example function: destoon calls the increment number starting from 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}
Copy after login

destoon How to add an auto-increment variable during LOOP loop

I want to output this $i++ in the template; how to put {loop $tags $i $t}{$i++}imgUrl[{$i}]='{$t[thumb]}';imgLink[{$i}] ='{$t[linkurl]}';imgText[{$i}]='{$t[alt]}';{/loop}or {loop $tags $i $t}imgUrl[{$i++}] ='{$t[thumb]}';imgLink[{$i++}]='{$t[linkurl]}';imgText[{$i++}]='{$t[alt]}';{/loop } does not work

destoon How to call the secondary columns and information quantity under the specified column

To call information of a certain category, pass the catid parameter in the tag. For example, &catid=5 means calling all information with category ID 5. If calling multiple categories, separate the category IDs with commas. For example, &catid=5,6,7 means calling all information with category IDs 5, 6, and 7. Category calls include subcategory information by default. If you do not need to include subcategories, you can set the &child=0 parameter. For example, &catid=5&child=0 means that only the information with category ID 5 is called, excluding the information of subcategories.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/867241.htmlTechArticledestoon implements the method of calling self-increasing numbers starting from 1, destoon This example describes the destoon implementation of calling self-increasing numbers starting from 1 1. The starting method has certain practicality when making data calls...
Related labels:
source:php.cn
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