First, create a template object: $tem = new Tem(); Then, load a template file (note: this can be done after you put the values in) $tem->load('template.html'); # or $tem->load_str(""" ~title html~
LetterIs For ~letter html~~is_for html~
"""); Then give it some data: $tem->set('title', 'Example Template Output'); $tem->set('alphabet_table', array( array('letter' => 'A', 'is_for' => 'pple'), array('letter' => 'B', 'is_for' => 'anana'))); Then you can get/print the output: echo $tem->run(); And you should see this: Example Template Output
LetterIs For A>A<pple B>B<anana