PHP code example of redbird / vlib-template5

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

    

redbird / vlib-template5 example snippets




declare(strict_types=1);

emplate('patht/to/templates/template.html');
$tmpl->setVar('name','Test Name');
$tmpl->pparse();



declare(strict_types=1);

use Redbird\vlib5\vlibIni;
use Redbird\vlib5\vlibTemplate;

tes are stored
    //... See src/vlibIni.php source for all options
]);

$tmpl = new vlibTemplate('template.html');
$tmpl->setVar('name','Test Name');
$tmpl->setloop('loop', [
     ['id' => 1, 'name' => 'Claus'],
     ['id' => 2, 'name' => 'Kelvin'],
     ['id' => 3, 'name' => 'Skrol'],
     ['id' => 4, 'name' => 'Micheal'],
]);
$tmpl->pparse();