An open API service indexing awesome lists of open source software.

https://github.com/ppeco/tplpp

Library for templates
https://github.com/ppeco/tplpp

php ppeco template-engine template-engine-html templates-html

Last synced: 3 months ago
JSON representation

Library for templates

Awesome Lists containing this project

README

          

# tplpp
```shell
composer require ppeco/tplpp
```

Library for templates

## Example
```php
use ppeco\tplpp\Template;

// From string
$template = new Template("Hello, {{\$variable.'!'}}");

//..or from file
$template = Template::fromFile("./example.tpl");

echo $template->addValue("variable", "World"); // Output: Hello, World!

//Alternative
echo $template->addValues([
"variable" => "World"
]);
```