1. Go to this page and download the library: Download yakub/simple-templating 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/ */
yakub / simple-templating example snippets
$output = \Yakub\SimpleTemplating\Replace::compile(
'Hi {{userName}}, you selected this options {{fn.implode(', ', options)}}',
[
'userName' => 'Jakub'
'options' => [
'PHP', 'SQL'
]
]
);
echo $output; // Output: "Hi Jakub, you selected this options PHP, SQL"