Smartyで文字を連結する -> cat

ふと、Smartyで文字列を連結したくなりましたが、やり方がわかりませんでした。
{$hoge + $huga}
とか?

いやいや、

cat
与えられた変数に値を連結します。

[smarty]
{$articleTitle|cat:” yesterday.”}
[/smarty]

という方法で連結します。簡単ですね。

関連する記事:

Powered by

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">