HBcms是一个用Pear框架+Smarty模板引擎构架的cms项目,欢迎大家参与制作Smarty模板

cat[连接字符串]

Parameter Position Type Required cat Description
1 string No empty This value to catentate to the given variable.
将cat里的值连接到给定的变量后面.

This value is concatenated to the given variable.
将cat里的值连接到给定的变量后面.

Example 5-4. cat

index.php:

$smarty = new Smarty;
$smarty->assign('articleTitle', "Psychics predict world didn't end");
$smarty->display('index.tpl');

index.tpl:

{$articleTitle|cat:" yesterday."}

输出结果:

Psychics predict world didn't end yesterday.
这是一份简单的Smarty手册和Smarty教材,熟练掌握Smarty模板,让您做项目事半功倍