Smarty - the compiling PHP template engine | ||
---|---|---|
上一篇教材 宏博CMS网站内容管理系统 收集整理 | Chapter 7. Built-in Functions[第七章.内建函数] | 下一篇教材 |
if statements in Smarty have much the same flexibility as php if statements, with a few added features for the template engine. Every if must be paired with an /if . else and elseif are also permitted. "eq", "ne","neq", "gt", "lt", "lte", "le", "gte" "ge","is even","is odd", "is not even","is not odd","not","mod","div by","even by","odd by","==","!=",">", "<","<=",">=" are all valid conditional qualifiers, and must be separated from surrounding elements by spaces.
Smarty 中的 if 语句和 php 中的 if 语句一样灵活易用,并增加了几个特性以适宜模板引擎. if 必须于 /if 成对出现. 可以使用 else 和 elseif 子句. 可以使用以下条件修饰词:eq、ne、neq、gt、lt、lte、le、gte、ge、is even、is odd、is not even、is not odd、not、mod、div by、even by、odd by、==、!=、>、<、<=、>=. 使用这些修饰词时必须和变量或常量用空格格开.
上一篇教材 宏博CMS网站内容管理系统 收集整理 | Smarty教材 主目录 | 下一篇教材 |
insert | 章节索引页 | ldelim,rdelim |