emphstart = <strong>
emphend = </strong>
title = Welcome to {$company}'s home page!
ErrorCity = You must supply a {#emphstart#}city{#emphend#}.
ErrorState = You must supply a {#emphstart#}state{#emphend#}.
This is the contents of foo.
Welcome to Foobar Pub & Grill's home page!
You must supply a <strong>city</strong>.
You must supply a <strong>state</strong>.
例 8-7. もうひとつの {eval} の例
これは、サーバ名 (大文字変換したもの) と IP を出力します。
割り当てられる変数 $str は、
データベースのクエリから取得します。
<?php $str = 'The server name is {$smarty.server.SERVER_NAME|upper} ' .'at {$smarty.server.SERVER_ADDR}'; $smarty->assign('foo',$str); ?>