TEMPLATE.CLASS.PHP

NAME

template.class.php

SYNOPSIS

template.class.php - a simple HTML template class for PHP

DESCRIPTION

template.class.[hp provides a general purpose HTML template capability allowing variables within the template to be expanded to their PHP value

It uses PHP as its templating language

No caching is provided

APPLICATION

 class Template
 Render variables into html page template
 No external dependencies
 
     Constructor for this template
     th = new Template([file == null])
    
     Set template variable to value
     null = th->setTemplate(name,value)
    
     Open, parse, and return the expanded template
     string or DIE = th->expandTemplate([file = null])
    
     Displays the template variables expanded
     null = th->showTemplate([file = null])

page.tpl.ph is an example HTML page template

BUGS

None known

AUTHOR

John Bartlett
johnb@thesolution.com.au

SEE ALSO

Standalone