Smarty模板中定义变量

{assign var = " i " value = " 1 " } {math var = " i " equation = " x + y " x = $i y = 1 }

 

 

 

用一段section模拟  
{section name=loop loop=$count}  
id: {$smarty.section.loop.index}  
{/section}  


给count赋个值  
$smarty->assign('count', 5);

你可能感兴趣的:(Math)