1. Go to this page and download the library: Download pytocryto/pytotpl 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/ */
pytocryto / pytotpl example snippets
$tpl = new \PytoTPL\PytoTPL();
$tpl->setConfig([
'tpl_folder' => __DIR__ . '/dir/to/templates/',
'cache_folder' => __DIR__ . '/dir/to/cache/',
'tpl_file_format' => '.tpl',
'compress' => false, // compression only available in a valid <HTML> document
'event_emitter' => true, // set to false for better performance
]);
{section.view: mySection}
html
{$variable}
{$array.key1.key2.key3}
{echo $variable}
{print $variable}
{$variable|substr:0,-1}