execute() method

Executes the template and returns final markup.

PHPTAL keeps all variables after execution and this method can be called multiple times. You can use it to create multiple versions of the same page (by changing only some variables between executions) or to generate multiple different templates with same variables (by calling setTemplate() between executions).


If you need “fresh” copy of PHPTAL, just create a new object.