Documentation / Documentation for PHP developers / Methods 

Assign

Assign is the method to assign variables to the template:

Example:

//assign
$tpl->assign( 'message', 'Hello World!' );

Template

{$message}

 

Assign( $associative_array )
This is the equivalent of calling assign() for each single couple name/value of the associative array:

Example:

//assign associative array
$array= array( 'name'=>'Rain', 'state'=>'New York' );
$tpl->assign($array);

Use template variable:

{$name}   {$state}

 

  ^ Methods ^ Draw »

Documentation for web designers




Documentation for PHP developers