PHP code example of veejay / template
1. Go to this page and download the library: Download veejay/template library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
veejay / template example snippets
use Veejay\Template\Template;
$template = new Template('path/to/template.tpl');
$params = [
'param' => 'one',
];
// Saving to file
$template->save('path/to/file', $params);
// Just return content
$content = $template->getContent($params);
tpl
Placeholder: {{param}}