Quote:
|
Are there any sites where I can get more information on how to use and best uses for this type of set up?
|
The only thing that springs to mind is
http://smarty.php.net/ the documents should give you some ideas. It's just one of a number of template engines.
Quote:
|
Is this a good practice in coding or are there better ways to do this?
|
If you ever looked at anything I've written you'll find I nearly always use a template system as I find that it allows me to decouple the PHP from the HTML thus making it easier to maintain the HTML and also reuse the PHP on another project.
If you use large amounts of PHP mixed within the HTML then if you hand the page to a designer who is not PHP literate then it is much harder for them to work on the design. The downside of templating is that if can take additional time to process over embedding the PHP directly in to the HTML.
I use a home grown template engine as it can then be optimised for the task in hand thus minimizing the overhead associated with a template system.