介绍
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
对象