10 lines implementation of PHP template engine
Filed under: php, template-engine on Sunday, November 4th, 2007 by kwa | No CommentsPHP provides the following functions.
- extract($array) — import associated array as local variables.
- include($filename) — read PHP file and evalue it.
Using these functions, you can get your own PHP template engine in 10 lines. The following is an example.