变量调节器后补篇
来源:互联网 发布:淘宝双11报名时间 编辑:程序博客网 时间:2024/05/17 23:38
今天老师又接着昨天的知识来把变量调节器讲完。
所有的变成小写:lower 将变量字符串小写
$smarty = new Smarty;
$smarty->assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
$smarty->display('index.tpl');
index.tpl:
{$articleTitle}
{$articleTitle|lower}
替换:replace 简单的搜索和替换字符串
$smarty = new Smarty;
$smarty->assign('articleTitle', "Child's Stool Great for Use in Garden.");
$smarty->display('index.tpl');
index.tpl:
{$articleTitle}
{$articleTitle|replace:"Garden":"Vineyard"}
{$articleTitle|replace:" ":" "}
所有字符大写:upper 将变量改为大写
$smarty = new Smarty;
$smarty->assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
$smarty->display('index.tpl');
index.tpl:
{$articleTitle}
{$articleTitle|upper}
所有的变成小写:lower 将变量字符串小写
$smarty = new Smarty;
$smarty->assign('articleTitle', 'Two Convicts Evade Noose, Jury Hung.');
$smarty->display('index.tpl');
index.tpl:
{$articleTitle}
{$articleTitle|lower}
替换:replace 简单的搜索和替换字符串
$smarty = new Smarty;
$smarty->assign('articleTitle', "Child's Stool Great for Use in Garden.");
$smarty->display('index.tpl');
index.tpl:
{$articleTitle}
{$articleTitle|replace:"Garden":"Vineyard"}
{$articleTitle|replace:" ":" "}
所有字符大写:upper 将变量改为大写
$smarty = new Smarty;
$smarty->assign('articleTitle', "If Strike isn't Settled Quickly it may Last a While.");
$smarty->display('index.tpl');
index.tpl:
{$articleTitle}
{$articleTitle|upper}
- 变量调节器后补篇
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- 变量调节器
- smarty变量调节器
- smarty变量调节器
- Smarty变量调节器
- smarty变量调节器
- smarty之变量调节器
- Smarty变量调节器
- 优化PHP性能实用技巧
- JavaScript+总结(二)
- C语言实现输入密码
- Javascript中的DOM操作
- 什么是缓存?
- 变量调节器后补篇
- poj 3468 A Simple Problem with Integers(线段树|成段更新,区间查询)
- JavaScript+总结(三)
- 最新学的ShowDiv
- linux 防火墙 iptables 设置 (系统管理员)
- ADO.Net常用基础知识总结
- 缓存
- org.hibernate.exception.ConstraintViolationException: could not insert解决
- JavaScript+总结(四)