PHP code example of glacial / template

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

    

glacial / template example snippets


use Glacial\Template\TemplateEngine;

$config = [
    __DIR__ . '/components',
    __DIR__ . '/pages'
];

$template = new TemplateEngine($config);

echo $template->render('header', [
    'title' => 'my title',
]);