Created
July 1, 2013 15:22
-
-
Save phalcon/5901789 to your computer and use it in GitHub Desktop.
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
<table> | |
{% for user in users %} | |
<tr> | |
<td> {{ user.id }} </td> | |
<td> {{ user.username }} </td> | |
</tr> | |
{% endfor %} | |
</table> |
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
$r = new Phalcon\Mvc\View\Engine\Volt\Compiler(); | |
$r->compile('b.volt'); | |
$user1 = new stdClass(); | |
$user1->id = 1; | |
$user1->username = 'hello-1'; | |
$user2 = new stdClass(); | |
$user2->id = 2; | |
$user2->username = 'hello-2'; | |
$users = array( | |
$user1, | |
$user2 | |
); | |
require $r->getCompiledTemplatePath(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment