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 with PHP and set up a specific set of instruction.

Templates may be produced in any file format, such as HTML, CSS, Javascript, JSON, PDF, URL, Markdown, etc.

Template may be large: they are then broken down into smaller and reusable sub-templates.

There are many PHP template packages, such as Twig, Latte, Blade, smarty, etc.

<?php

    // piece
    echo "<h1>".$name."</h1>";

?>

Documentation

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