21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
require_once "include/smarty_config.php";
$a=1;
$b=2;
$c=7;
$smarty->assign("a",$a);
$smarty->assign("b",$b);
$smarty->assign("c",$c);
$smarty->display("t.tpl");
?>
a+b:<{$a+$b}><br />
a/c:<{$a/$c|string_format:"%.2f"}><br />
(a+b)/c:<{($a+$b)/$c|string_format:"%.2f"}><br />
<?php
require_once "include/smarty_config.php";
$a=1;
$smarty->assign("a",$a);
$smarty->display("t.tpl");
?>
<{$a*100+$b*100+$c*100+$d*100}>