cat[連接字串]LOGIN

cat[連接字串]

cat(將cat裡的值連接到給定的變數後面)

test.php:
$smarty = new Smarty;
$smarty->assign('articleTitle', "Psychics predict world didn't end");
$smarty->display('test.html');

test.html:
{$articleTitle|cat:" yesterday."}

輸出:
Psychics predict world didn't end yesterday.

#下一節
<?php echo "cat(将cat里的值连接到给定的变量后面)";
章節課件