cat
パラメータの位置 | 型? | 必須 | デフォルト | 概要 |
1 | string? | No | empty | 与えられた変数にこの値を連結する |
与えられた変数に値を連結します。
例 5-4. cat
<?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.