Paypal

# Smarty Icon

You may use the Smarty logo according to the trademark notice.

# Sites Using Smarty

Get the juciest casino bonuses at this great website

If you are looking for great entertainment online, then we would like to recommend CasinoAdvisers.com. Find the best casino bonus available and much more that makes your casino experience much more enjoyable!

## {while}

Smarty的`{while}`循环和PHP的while 在灵活性方面是几乎一样的，只是增加了少许特性。 每个`{while}`必须有相应的`{/while}`. 任何的PHP条件或者函数表达式都是可用的，如||, or, &&, and, is_array(), 等等.

== eq \$a eq \$b 等于 ==
!= ne, neq \$a neq \$b 不等于 !=
> gt \$a gt \$b 大于 >
< lt \$a lt \$b 小于 <
>= gte, ge \$a ge \$b 大于等于 >=
<= lte, le \$a le \$b 小于等于 <=
===   \$a === 0 绝对等于 ===
! not not \$a 非 (一元运算) !
% mod \$a mod \$b 取模 %
is [not] div by   \$a is not div by 4 取模为0 \$a % \$b == 0
is [not] even   \$a is not even [非] 取模为0 (一元运算) \$a % 2 == 0
is [not] even by   \$a is not even by \$b 水平分组 [非] 平均 (\$a / \$b) % 2 == 0
is [not] odd   \$a is not odd [非] 奇数 (一元运算) \$a % 2 != 0
is [not] odd by   \$a is not odd by \$b [非] 奇数分组 (\$a / \$b) % 2 != 0

Example 7.79. {while} 循环

```

{while \$foo > 0}
{\$foo--}
{/while}

```