Smarty - Manual手册 - Chapter 13. Smarty Class Methods第13章 Smarty类方法 - assign_by_ref()按引用赋值
assign_by_ref()
Description
描述
void assign_by_ref ( string varname, mixed var)This is used to assign() values to the templates by reference instead of making a copy. See the PHP manual on variable referencing for an explanation.
本函数用于通过引用而不是复制向模板assign()值,参考PHP手册中变量引用获得更详细的说明。
Technical Note: This is used to assign values to the templates by reference. If you assign a variable by reference then change its value, the assigned value sees the change as well. For objects, assign_by_ref() also avoids an in-memory copy of the assigned object. See the PHP manual on variable referencing for an in-depth explanation.
技术说明:本函数用于通过引用向模板赋值。如果在通过引用赋值后修改变量的值,那么已赋的值也将相应的改变。对于对象来说,assign_by_ref()函数可以避免赋值对象在内存中被复制。参考PHP手册中变量引用获得更详细的说明。
See also assign(), clear_all_assign(), append(), {assign} and get_template_vars().
参考assign(), clear_all_assign(), append(), {assign}和get_template_vars().
[assign_by_ref()按引用赋值 - 文档]
http://smarty.php.net/manual/en/api.assign.by.ref.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
[Smarty - Manual手册 - Chapter 3. Basic Syntax第3章 基础语法]
Comments注释, http://smarty.php.net/manual/en/language.basic.syntax.php#language.syntax.commentsMath数学运算, 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
escape转义修饰符, http://smarty.php.net/manual/en/language.modifier.escape.php
[Smarty - Manual手册 - Chapter 7. Built-in Functions内建函数]
{foreach},{foreachelse}, http://smarty.php.net/manual/en/language.function.foreach.php{strip}在显示之前删除每行前后多余的空格和回车字符, http://smarty.php.net/manual/en/language.function.strip.php
[Smarty - Manual手册 - Chapter 8. Custom Functions第8章 自定义函数]
{counter}计数器, http://smarty.php.net/manual/en/language.custom.functions.php
[Smarty - Manual手册 - 第13章 Smarty类方法]
register_function()动态注册模板函数插件, http://smarty.php.net/manual/en/api.register.function.phpassign_by_ref()按引用赋值, http://smarty.php.net/manual/en/api.assign.by.ref.php