PHP code example of zhukmax / twigpad
1. Go to this page and download the library: Download zhukmax/twigpad 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/ */
zhukmax / twigpad example snippets
er = new Twig_Loader_Array(array(
'index' => 'Hello {{ rightpad(name, 9, "#") }}',
));
$twig = new Twig_Environment($loader);
$twig->addExtension(new Zhukmax\TwigPad\TwigPad());
echo $twig->render('index', array('name' => 'Max'));
// => Hello Max######