Why separate presentation from logic?The simple answer to the question is, "It keeps things simple". If presentation wasn't separated from logic around your house, you'd have to be an electrician to replace light-switch covers. The same goes for large-scale web applications. Graphic designers shouldn't need to be software engineers in order to update the fonts in a web page. Separating logic from presentation makes that possible.
Within the PHP script, variables will eventually need assigned to the FastTemplate instance. Here is the syntax for doing this:
$tpl->assign("HOUSE", $House);
Now the FastTemplate object contains the data found in the
variable, "$House"
Parsing Templates Parsing the FastTemplate instance remains the final bit of processing that takes place in order to see results. These lines accomplish that task.
"MAIN" in the above code represents the top level HTML
template. Sometimes many HTML templates are parsed and each one will be represented with a distinct name. "MAIN" refers to the parent HTML template. The final command calls the FastPrint function which delivers the final product, a beautiful dynamic HTML page, to the computer screen.