smarty:字符串连接 cat

作者: 坎肩儿 分类: Smarty模板 发布时间: 2011-04-18 12:08

示例:

index.php:

$smarty = new Smarty;
$smarty->assign(‘aTitle’, “Psychics predict world didn’t end”);
$smarty->display(‘index.tpl’);

index.tpl:

{$aTitle|cat:” yesterday.”|cat:” go on.”}

OUTPUT:

Psychics predict world didn’t end yesterday. go on.