I'm twiting

访问统计

free counters

可以给assign单独传一个array作为参数

一段smarty源代码,可以给assign单独传一个array作为参数
    /**
* assigns values to template variables
*
* @param array|string $tpl_var the template variable name(s)
* @param mixed $value the value to assign
*/
function assign($tpl_var$value null)
{
if (
is_array($tpl_var)){
foreach (
$tpl_var as $key => $val) {
if (
$key != ) {
$this->_tpl_vars[$key] = $val;
}
}
} else {
if (
$tpl_var != )
$this->_tpl_vars[$tpl_var] = $value;
}
}

Share on Facebook

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>