Smarty - Manual手册 - Chapter 8. Custom Functions第8章 自定义函数 - {counter}计数器
来源:互联网 发布:数据分析师简历 编辑:程序博客网 时间:2024/04/29 04:12
Smarty - Manual手册 - Chapter 8. Custom Functions第8章 自定义函数 - {counter}计数器
{counter}
{counter} is used to print out a count. {counter} will remember the count on each iteration. You can adjust the number, the interval and the direction of the count, as well as determine whether or not to print the value. You can run multiple counters concurrently by supplying a unique name for each one. If you do not supply a name, the name "default" will be used.
If you supply the assign attribute, the output of the {counter} function will be assigned to this template variable instead of being output to the template.
Example 8-4. {counter}
{* initialize the count *}
{counter start=0 skip=2}<br />
{counter}<br />
{counter}<br />
{counter}<br />
this will output:
0<br />
2<br />
4<br />
6<br />
[counter文档]
http://smarty.php.net/manual/en/language.function.counter.php
[Smarty - 官方网站]
http://smarty.php.net/[Smarty - 下载地址]
当前版本 2.6.18, http://smarty.php.net/do_download.php?download_file=Smarty-2.6.18.tar.gz
全部列表, http://smarty.php.net/download.php
[Smarty - 相关论坛]
http://php.board.newsmth.net/http://forum.csdn.net/SList/PHP/
http://www.phpinsider.com/smarty-forum/
http://news.php.net/php.smarty.general
http://news.php.net/php.smarty.dev
http://news.php.net/php.smarty.cvs
[Smarty - 关键词]
smarty[Smarty - Manual手册]
借助cycle实现循环输出值, http://smarty.php.net/manual/en/language.function.cycle.php
Smarty的cat函数, http://smarty.php.net/manual/en/language.modifier.cat.php
Smarty的upper函数, http://smarty.php.net/manual/en/language.modifier.upper.php
[Smarty - Manual手册 - 第3章 基础语法]
Comments注释, http://smarty.php.net/manual/en/language.basic.syntax.php#language.syntax.commentsMath数学运算, http://smarty.php.net/manual/en/language.math.php
[Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符]
cat将值连接到给定变量之后, http://smarty.php.net/manual/en/language.modifier.cat.php
upper将字符串转换成大写字母, http://smarty.php.net/manual/en/language.modifier.upper.php
escape转义修饰符, http://smarty.php.net/manual/en/language.modifier.escape.php
[Smarty - Manual手册 - Chapter 7. Built-in Functions内建函数]
{foreach},{foreachelse}, http://smarty.php.net/manual/en/language.function.foreach.php{strip}在显示之前删除每行前后多余的空格和回车字符, http://smarty.php.net/manual/en/language.function.strip.php
[Smarty - Manual手册 - Chapter 8. Custom Functions第8章 自定义函数]
{assign}用于在模板执行过程中设置模板变量, http://smarty.php.net/manual/en/language.custom.functions.php#language.function.assign
{counter}计数器, http://smarty.php.net/manual/en/language.custom.functions.php
[Smarty - Manual手册 - 第13章 Smarty类方法]
register_function()动态注册模板函数插件, http://smarty.php.net/manual/en/api.register.function.phpassign_by_ref()按引用赋值, http://smarty.php.net/manual/en/api.assign.by.ref.php
- Smarty - Manual手册 - Chapter 8. Custom Functions第8章 自定义函数 - {counter}计数器
- PHP - Smarty模板引擎 - Manual手册 - 中文版 - Chapter 8. Custom Functions第8章自定义函数 - {assign}用于在模板执行过程中设置模板变量
- PHP - Smarty模板引擎 - Manual手册 - Chapter 7. Built-in Functions第7章 内建函数 - {config_load}用于从一个配置文件加载配置变量到模板中
- Smarty - Manual手册 - Chapter 13. Smarty Class Methods第13章 Smarty类方法 - assign_by_ref()按引用赋值
- Smarty - Manual手册 - Chapter 3. Basic Syntax第3章 基础语法 - Math数学运算
- Smarty - 手册 - 第8章 自定义函数 - {cycle}循环
- Smarty - Manual手册 - Chapter 7. Built-in Functions内建函数 - {strip}在显示之前删除每行前后多余的空格和回车字符
- Smarty - Manua手册 - Chapter 7. Built-in Functions第7章 内建函数 - {foreach},{foreachelse}用于像访问序数数组一样访问关联数组
- Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符 - upper将字符串转换成大写字母
- Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符 - escape转义修饰符
- Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符 - escape转义修饰符
- PHP - Smarty模板引擎 - 翻译 - Manual手册 - Chapter 3. Basic Syntax第3章 基础语法 - Comments注释
- smarty 中的自定义函数counter
- PHP - Smarty模板引擎 - Manual手册 - 翻译中 - 第13章 Smarty类方法 - register_function()动态注册模板函数插件
- PHP - Smarty模板引擎 - Manual手册 - Chapter 12. Smarty Class Variables第十二章Smarty类变量 - $plugins_dir插件文件夹
- Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符 - cat将值连接到给定变量之后
- Hadoop自定义计数器Counter
- MySQL 5.7 Reference Manual Chapter 13 Functions and Operators 参考手册第十三章函数与操作符内容总结
- Linux的分段和分页机制
- 一步一步教你开发《松鼠推箱子》手机游戏
- .NET Remoting中的事件处理(.NET Framework 2.0)(一)
- java.lang.NoClassDefFoundError:org/springframework/beans/factory/support/ReaderContext 问题的解决办法
- execl 编译时的警告: warning: not enough variable arguments to fit a sentinel 解释说明(转载)
- Smarty - Manual手册 - Chapter 8. Custom Functions第8章 自定义函数 - {counter}计数器
- 用AJAX编写用户注册实例及技术小结(局部刷新)
- 内存泄漏的检测、定位和解决经验总结
- Smarty - 官方网站
- 如何通过VBA操纵Microsoft Project
- 《解剖PetShop》系列之三
- SqlConnection,SqlCommand,SqlReader,SqlDataAdaper的用法总结!!
- DoJa平台手机游戏的开发与移植
- 《解剖PetShop》系列之二 PetShop数据访问层之数据库访问设计