PHP code example of reekoheek / t

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

    

reekoheek / t example snippets


use T\T;

$t = new T('../templates'); // '../templates' will be your base 
                            // templates directory
$t->render('/home'); // '/home' will be plain php template file 
                     // relative to your base template directory above,
                     // but you ommit the file extension (.php)

 $t->section('header', function() { 

 $t->section('page', function() { 

 $t->extend('layout')