您的位置:首页 > 其它

Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符 - upper将字符串转换成大写字母

2007-11-18 20:45 936 查看

Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符 - upper将字符串转换成大写字母

upper

This is used to uppercase a variable. This is equivalent to the PHP strtoupper() function.

Example 5-22. upper

<?php
$smarty->assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
?>
Where template is:

{$articleTitle}
{$articleTitle|upper}

Will output:

If Strike isn't Settled Quickly it may Last a While.
IF STRIKE ISN'T SETTLED QUICKLY IT MAY LAST A WHILE.

See also lower and capitalize.


[upper将字符串转换成大写字母 - 文档]

http://smarty.php.net/manual/en/language.modifier.upper.php

[Smarty - 官方网站]

http://smarty.php.net/

[Smarty - 下载地址]

当前版本 2.6.18, http://smarty.php.net/do_download.php?download_file=Smarty-2.6.18.tar.gz

全部列表, http://smarty.php.net/download.php

[Smarty - 相关论坛]

http://php.board.newsmth.net/
http://forum.csdn.net/SList/PHP/
http://www.phpinsider.com/smarty-forum/
http://news.php.net/php.smarty.general
http://news.php.net/php.smarty.dev
http://news.php.net/php.smarty.cvs

[Smarty - 关键词]

smarty

[Smarty - Manual手册]

借助cycle实现循环输出值, http://smarty.php.net/manual/en/language.function.cycle.php



Smarty的cat函数, http://smarty.php.net/manual/en/language.modifier.cat.php



Smarty的upper函数, http://smarty.php.net/manual/en/language.modifier.upper.php

{assign}标记, http://smarty.php.net/manual/en/language.custom.functions.php#language.function.assign

escape转义修饰符, http://smarty.php.net/manual/en/language.modifier.escape.php

counter计数器, http://smarty.php.net/manual/en/language.function.counter.php

[Smarty - Manual手册 - 第3章 基础语法]

Comments注释, http://smarty.php.net/manual/en/language.basic.syntax.php#language.syntax.comments Math数学运算, http://smarty.php.net/manual/en/language.math.php

[Smarty - Manual手册 - Chapter 5. Variable Modifiers第5章 变量修饰符]

cat将值连接到给定变量之后, http://smarty.php.net/manual/en/language.modifier.cat.php
upper将字符串转换成大写字母, http://smarty.php.net/manual/en/language.modifier.upper.php



[Smarty - Manual手册 - 第7章 内建函数]

{foreach},{foreachelse}, http://smarty.php.net/manual/en/language.function.foreach.php

[Smarty - Manual手册 - 第13章 Smarty类方法]

register_function()动态注册模板函数插件, http://smarty.php.net/manual/en/api.register.function.php
assign_by_ref()按引用赋值, http://smarty.php.net/manual/en/api.assign.by.ref.php
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐