PHP code example of dlundgren / phrender
1. Go to this page and download the library: Download dlundgren/phrender 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/ */
dlundgren / phrender example snippets
$factory = new Phrender\Template\Factory(['/path/to/views']);
$engine = new Phrender\Engine($factory, new Phrender\Context\Collection());
// index.php: <?= $this->var
$factory = new Phrender\Template\Factory(['/path/to/views'], 'phtml');
$engine = new Phrender\Engine($factory, new Phrender\Context\Collection());
// index.phtml: <?= $this->var