cat

PHP Smarty

Smarty - the compiling PHP template engine
Prev 来源:PHP中文社区 Chapter 5. Variable Modifiers Next

cat[连接字符串]

Parameter Position Type Required cat Description
1 string No empty This value to catentate to the given variable.
将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.

Prev 来源:PHP中文社区 Home Next
count_characters Up count_paragraphs