cat
This value is concatenated to the given variable.
此函式會將給定的變數連接在變數之後。
Example 5-4. cat
<?php $smarty = new Smarty; $smarty->assign('articleTitle', "Psychics predict world didn't end"); $smarty->display('index.tpl'); ?>
|
Where index.tpl is:
其中 index.tpl 的內容為:
{$articleTitle|cat:" yesterday."} |
This will output:
而輸出的結果為:
Psychics predict world didn't end yesterday. |
|