> Smarty模板引擎中文在线手册 > cat [连接字符串]

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."}

OUTPUT:

Psychics predict world didn't end yesterday.
上一篇:
下一篇: