PHP code example of phpmystic / liqx
1. Go to this page and download the library: Download phpmystic/liqx 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/ */
phpmystic / liqx example snippets
Phpmystic\Liqx\Template;
$template = Template::parse('<h1>Hello, {name | escape}!</h1>');
echo $template->render(['name' => 'World']);
// <h1>Hello, World!</h1>
use Phpmystic\Liqx\Environment;
use Phpmystic\Liqx\Template;
$environment = Environment::create();
$environment->setCompiledTemplateDir(__DIR__ . '/var/cache/liqx');
$template = Template::parse('<p>{message | escape}</p>', $environment);
echo $template->render(['message' => 'Compiled with Liqx']);