Created
March 17, 2019 21:25
-
-
Save yuriy-yarvinen/370f753a55ce060a3cf67618a4ae81e0 to your computer and use it in GitHub Desktop.
twigBegining
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
$loader = new Twig_Loader_Filesystem('templates'); | |
$twig = new Twig_Environment($loader); | |
$template = $twig->loadTemplate('template.html'); | |
$array = array( 'data' => array('client1'=> array('id'=>'1','name'=>'jone'),'client2'=> array('id'=>'2','name'=>'mike'),'client3'=> array('id'=>'3','name'=>'jone3'),'client4'=> array('id'=>'4','name'=>'josef'),'client5'=> array('id'=>'5','name'=>'jonesa')) ); | |
echo $template->render(array('data'=>$array)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment