> Smarty模板引擎中文在线手册 > lower [小写]

lower
小写

This is used to lowercase a variable.
将变量字符串小写

Example 5-13. lower
例 5-13.小写

index.PHP:

$smarty = new Smarty;
$smarty->assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
$smarty->display('index.tpl');

index.tpl:

{$articleTitle}
{$articleTitle|lower}

OUTPUT:

Two Convicts Evade Noose, Jury Hung.
two convicts evade noose, jury hung.
上一篇:
下一篇: