Get Smarty

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

Name

assign_by_ref() — 参照として値を割り当てます。

説明

void assign_by_ref(string varname,
                   mixed var);

これを使用して、コピーを作ることなく参照として テンプレートに変数を 割り当て ます。詳細は、PHP マニュアルのリファレンスの説明を参照して下さい。

テクニカルノート

これは参照によってテンプレートに変数を追加するのに使用されます。 参照による値が追加された場合は、その値が変更されると追加された元の値も変更されます。 objects についても、assign_by_ref() は追加されたオブジェクトをメモリ内にコピーする事を避けます。詳細は、 PHP マニュアルのリファレンスの説明を参照して下さい。

Example 13.4. assign_by_ref()


<?php
// 名前/値のペアを渡します
$smarty->assign_by_ref('Name', $myname);
$smarty->assign_by_ref('Address', $address);
?>

   

assign()clear_all_assign()append(){assign} および get_template_vars() も参照してください。

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 19 plus 11? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk