随笔分类 - Smarty
摘要:{foreach}循环也有自身属性的变量,可以通过{$smarty.foreach.name.property}访问,其中"name"是name属性。 例 <{foreach $items as $r name=row_name }> .index包含当前数组索引,从零开始,每次循环增长1 <{if
阅读全文
摘要:Smarty标签运算: 在页面上做简单的运算[temp5.html] 条件判断if 循环结构 for foreach用得比较多,foreach例子从数据库取出的数据 section功能和foreach类似,没foreach好理解 不推荐用 while temp5.html
阅读全文
摘要:$select="SELECT {$col_name} FROM woke_order where deleted=0 ".$where.$orderby ; // 取出数组 $rows=array(); $result=$db->query($select); while($row=$db->fe
阅读全文
摘要:在smarty的使用过程中,有很多时候需要将一个数组输出到模板中来处理,以下将演示如何将一个索引(index)数组和关联(assocaite)数组在页面中展现出来。本文中假设有如下一个索引数组1、索引数组Code highlighting produced by Actipro CodeHighli...
阅读全文