What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
変数を大文字に置き換えます。これは、PHP の
strtoupper()
関数と同義です。
Example 5.22. upper
<?php $smarty->assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While."); ?>
テンプレート
{$articleTitle} {$articleTitle|upper}
出力
If Strike isn't Settled Quickly it may Last a While. IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE.
lower
および
capitalize
も参照してください。