介紹
Smarty是一個PHP的模板引擎。更明確來講,它能夠幫助開發者更好地 分離程序邏輯和頁面顯示。
{if $item.question.replyCount eq 0} neq gt lt
{foreach $questionList.list as $item}
然而Smarty2語法{foreach from=$myarraykey="mykey" item="myitem"}
也一樣支持。json
{count($Arr)}
{$Arr|@count}
{$Arr|count}
question: {$question|json_encode|escape:none}
isLogin: {intval($userInfo.isLogin)|default:0}
empty($item.reply)
mb_strlen($item.reply.abstractContent,"UTF-8")
數組
$item.reply.abstractContent|mb_substr:0:80:'UTF-8'
code
$item.reply.content|escape:none|https_trans
對象