PHP code example of palmtree / template

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

    

palmtree / template example snippets



use Palmtree\Template\Template;

$template = new Template('front-page.php');

$template['document_title'] = 'Hello World Site';
$template['heading']        = 'Hello World';
$template['content']        = '<p>Welcome to the Hello World site</p>';

echo $template;
html
<!-- front-page.php -->
<!doctype html>
<html>
<head>
    <title> echo $document_title;