IndexAction.class.php:
$name='xiaohuang';
$this->name=$name;
index.html:
<switch name="name">
<case value='laoshi'>小明,滚出去</case>
<case value='xiaohong|xiaohuang'>小明,你滚出去</case>
<default/>小明,自己滚出去</case>
</switch>
$name='xiaohuang';
$this->name=$name;
index.html:
<switch name="name">
<case value='laoshi'>小明,滚出去</case>
<case value='xiaohong|xiaohuang'>小明,你滚出去</case>
<default/>小明,自己滚出去</case>
</switch>
2016-10-24
eq= neq!= gt> egt>= lt< elt<= heq=== nheq!==<br/>
<for start='1' end='10' comparison='elt' name='k'>
{$k}<br/>
</for>
<for start='1' end='10' comparison='elt' name='k'>
{$k}<br/>
</for>
2016-10-24
IndexAction.class.php:
$num=15;
$this->num=$num;
index.html:
<if condition="$num gt 10">num大于10
<elseif condition="$num lt 10"/> num小于10
<else/>num等于10
</if>
$num=15;
$this->num=$num;
index.html:
<if condition="$num gt 10">num大于10
<elseif condition="$num lt 10"/> num小于10
<else/>num等于10
</if>
2016-10-24
For You:
index.html:
<volist name='person' id='data' offset='1' length='2' empty='我没数据'>
{$data['name']}----{$data['age']}<br/>
</volist>
<p>
<foreach name='person' item='data'>
{$data['name']}----{$data['age']}<br/>
</foreach>
index.html:
<volist name='person' id='data' offset='1' length='2' empty='我没数据'>
{$data['name']}----{$data['age']}<br/>
</volist>
<p>
<foreach name='person' item='data'>
{$data['name']}----{$data['age']}<br/>
</foreach>
2016-10-24
For You:
IndexAction.class.php:
$person=array(
1=>array('name'=>'Jack','age'=>'18'),
2=>array('name'=>'Tom','age'=>'19'),
3=>array('name'=>'Peter','age'=>'20'),
4=>array('name'=>'Mary','age'=>'21'),
);
$this->person=$person;
$this->display();
IndexAction.class.php:
$person=array(
1=>array('name'=>'Jack','age'=>'18'),
2=>array('name'=>'Tom','age'=>'19'),
3=>array('name'=>'Peter','age'=>'20'),
4=>array('name'=>'Mary','age'=>'21'),
);
$this->person=$person;
$this->display();
2016-10-24