日期:2014-05-17 浏览次数:20431 次
include_once("smarty_inc.php");
$arr=array('a','b','c','d','e','f');
$smarty->assign('arr',$arr);
$smarty->display("test.tpl");
<table width="100px">
{section name=a loop=$arr}
<tr bgcolor="{cycle values="#eeeeee,#55eero"}">
<td>
{$arr[a]}
</td>
</tr>
{/section}
</table>