destoon实现调用自增数字从1开始的方法,destoon
本文示例讲述了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}
我要在模板里输出 这个$i++; 怎么放{loop $tags $i $t}{$i++}imgUrl[{$i}]='{$t[thumb]}';imgLink[{$i}]='{$t[linkurl]}';imgText[{$i}]='{$t[alt]}';{/loop}或{loop $tags $i $t}imgUrl[{$i++}]='{$t[thumb]}';imgLink[{$i++}]='{$t[linkurl]}';imgText[{$i++}]='{$t[alt]}';{/loop}都不行
调用某一分类的信息在标签里传递catid参数,例如&catid=5表示调用分类ID为5的所有信息。如果调用多个分类,用逗号分隔分类ID,例如 &catid=5,6,7表示调用分类ID为5、6、7的所有信息。分类调用默认包含子分类的信息,如果不需要包含子分类,可设置&child=0参数。例如&catid=5&child=0表示只调用分类ID为5的信息,不包括子分类的信息。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

Notepad++7.3.1
Easy-to-use and free code editor

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.