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:

Sites Using Smarty

Advertisement

Name

getTemplateVars() — 割り当てられた変数の値を返します。

説明

array getTemplateVars(string varname);

パラメータが与えられない場合は、 全ての 割り当てられた 変数の配列を返します。

Example 13.23. getTemplateVars


<?php
// 割り当てられたテンプレート変数'foo'を取得します
$myVar = $smarty->getTemplateVars('foo');

// 割り当てられたテンプレートの全ての変数を取得します
$all_tpl_vars = $smarty->getTemplateVars();

// では見てみましょう
print_r($all_tpl_vars);
?>

   

assign(){assign}append()clearAssign()clearAllAssign() および getConfigVars() も参照してください。