Template¶
A template is a preset document, filled with values in placeholders, to display the resulting data. This is also called a view.
PHP used to be known as a template engine. Nowadays, template engines are written in PHP.
Templates may be produced in any file format: HTML, CSS, Javascript, JSON, PDF, URL, Markdown, etc.
Template may be large: they are then broken down into smaller and reusable sub-templates.
Some PHP template packages: Twig, Latte, Blade, smarty.
<?php
// piece
echo "<h1>".$name."</h1>";
?>
See also How WordPress Tells which Template to Load for a URL.
Related : View In Presentation, HyperText Markup Language (HTML), CSS, PDF, JavaScript Object Notation (JSON), Markdown, Code Generator, Framework, Render
Related packages : twig/twig, smarty/smarty, latte/latte, twig/twig, jenssegers/blade