vlibTemplate | 
         ![]()  | 
      
| Function Description | 
setVar(mixed name [, mixed value])  | 
setVar() can be called in two different ways
1) The most commonly used method, passing in a name and a value:
| Example | 
   $tmpl->setVar('title', 'vlibTemplate test page'); // title is the name used in <TMPL_VAR>
 | 
2) Passing in an array of key=>value pairs, each element taken as a seperate var:
| Example | 
   $myvars = array('fav_color' => 'blue',
                   'fav_tvshow'=> 'Eastenders');
   $tmpl->setVar($myvars);  // no second parameter
 |