$reuse_code
$reuse_code :
Whether to store compiled php code or not (for debug purpose)
SmartTemplate Class
'Compiles' HTML-Templates to PHP Code
Usage Example I:
$page = new SmartTemplate( "template.html" ); $page->assign( 'TITLE', 'TemplateDemo - Userlist' ); $page->assign( 'user', DB_read_all( 'select * from ris_user' ) ); $page->output();
Usage Example II:
$data = array( 'TITLE' => 'TemplateDemo - Userlist', 'user' => DB_read_all( 'select * from ris_user' ) ); $page = new SmartTemplate( "template.html" ); $page->output( $data );
assign(string $name, mixed $value = '')
Assign Template Content
Usage Example: $page->assign( 'TITLE', 'My Document Title' ); $page->assign( 'userlist', array( array( 'ID' => 123, 'NAME' => 'John Doe' ), array( 'ID' => 124, 'NAME' => 'Jack Doe' ), );
string | $name | Parameter Name |
mixed | $value | Parameter Value |