Better approach, treat non-array values as objects
[haanga.git] / examples / template_runtime.php
blob77d060bc61ea0135917d27daab6f890f119f4970
1 <?php
3 require "../lib/Haanga.php";
5 $fnc = Haanga::compile(<<<EOT
6 <h1>{{foobar}}{{ foobar }}</h1>
8 Este template será compilado a una función PHP ({{foo|default:foobar}})
11 EOT
14 $fnc(array("foobar" => 'hola', 'foo' => '.I.'), FALSE /* print it */);
15 $fnc(array("foobar" => 'chau'), FALSE /* print it */);