What is Smarty?
Why use it?
Use Cases and Work Flow
Syntax Comparison
Template Inheritance
Best Practices
Crash Course
You may use the Smarty logo according to the trademark notice.
For sponsorship, advertising, news or other inquiries, contact us at:
clearAllAssign() — 清除全部赋值
void clearAllAssign();
Example 14.8. clearAllAssign()
<?php // 传递键值对 $smarty->assign('Name', 'Fred'); $smarty->assign('Address', $address); // 显示上面的值 print_r( $smarty->getTemplateVars() ); // 清除全部的值 $smarty->clearAllAssign(); // 什么也不显示 print_r( $smarty->getTemplateVars() ); ?>
参见
clearAssign()
,
clearConfig()
,
getTemplateVars()
,
assign()
和 append()