Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 407 Bytes

README.md

File metadata and controls

24 lines (18 loc) · 407 Bytes

tplpp

composer require ppeco/tplpp

Library for templates

Example

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"
]);