PHP code example of cherry-project / templater

1. Go to this page and download the library: Download cherry-project/templater 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/ */

    

cherry-project / templater example snippets




use Cherry\Templating\Templater;

$templateEngine = new Templater(PATH_TO_TEMPLATES);

$args = [
    'name' => 'Name 1',
    'surname' => 'Surname 1'
];

$response = $templateEngine->render('index.templater.php', [
    'name' => 'Temuri'
]);

echo $response;