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>";
?>
See Also
Related
- View In Presentation
- HyperText Markup Language (HTML)
- CSS
- JavaScript Object Notation (JSON)
- Markdown
- Code Generator
- Framework
- Render
- Blade
- Twig
- View
- Zero-code