PHPackages                             lvinceslas/htmltemplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. lvinceslas/htmltemplate

ActiveLibrary[Templating &amp; Views](/categories/templating)

lvinceslas/htmltemplate
=======================

A simple template engine for PHP

2.0.0(2mo ago)011CECILL-CPHPPHP &gt;=8.0CI failing

Since Sep 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/lvinceslas/htmltemplate)[ Packagist](https://packagist.org/packages/lvinceslas/htmltemplate)[ RSS](/packages/lvinceslas-htmltemplate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (0)

HtmlTemplate
============

[](#htmltemplate)

[![Packagist Version](https://camo.githubusercontent.com/728cbe16d4c6ccad80b06451cd6399dda685649a517ac1ac76b4dd94de35c4f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c76696e6365736c61732f68746d6c74656d706c6174652e737667)](https://packagist.org/packages/lvinceslas/htmltemplate)[![PHP Version](https://camo.githubusercontent.com/f0308d785cb174b798fda65f4891688bd5d1c3d9acca8e35e058dbc36fb508a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c76696e6365736c61732f68746d6c74656d706c6174652e737667)](https://packagist.org/packages/lvinceslas/htmltemplate)[![License](https://camo.githubusercontent.com/1b84e1bd69cbc92638e0a068ec9ece66d9c63707a0d003e4c44a639fddb71aec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c76696e6365736c61732f68746d6c74656d706c6174652e737667)](LICENSE)

A simple template engine for PHP.

Installation
------------

[](#installation)

```
composer require lvinceslas/htmltemplate
```

### Using Docker (without Composer installed locally)

[](#using-docker-without-composer-installed-locally)

```
docker run --rm -it \
  -v "$(pwd):/app" \
  -w /app \
  composer require lvinceslas/htmltemplate
```

Usage
-----

[](#usage)

Create an HTML template file with placeholders, for example:

```
Hello {%NAME%}, you have successfully installed lvinceslas/htmltemplate!
```

Then use it in PHP:

```
