The Advantage of Using PHP Template
What is PHP Template Engine?
Template engine is in a sense a component that allows separation of php and HTML codes. When template engine is used in the application, HTML code is placed into separate files, templates. In addition to the HTML code, these files contain processing instructions that template engines execute, assembling the final HTML page which is downloaded and converted by browsers into what we see as Web pages. Typically, template engines execute a number of processing instructions, including, but certainly not limited to inserting a value of a certain variable, looping through a set of listings, displaying their titles, and including other template(s).
The biggest advantage of any template engine is to separate the roles of a business domain developer (a programmer), and a front-end developer(designer) even if both roles are performed by the sme person. These tasks, while being deeply interrelated, still require different skills and capabilities. When programmers work on the business logic of a website, they need to concentrate on the proper application design, architecture, data stuctures, business rules, and information storage.
A free Basic PHP based Template engine
PHP itself is a template engine, why use another ocne on top of PHP? My answer to this is as follows: it is true, there is no need for another one, PHP is well-suited to take care of this issue nicely. However, it all works fine if we keep the business logic and presentation parts of code in different files.
Use PHP template engine. Recommend use Twig template engine.