Created
October 18, 2012 14:18
-
-
Save demian85/3912156 to your computer and use it in GitHub Desktop.
handlebars.js con PHP...
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
<? | |
$db = DB::getConnection(); | |
$sql = "SELECT * FROM Projects ORDER BY name"; | |
$data = $db->query($sql)->fetchAll(); | |
array_walk($data, function(&$v) { | |
$v['enabled'] = (int)$v['enabled']; | |
$v['visible'] = (int)$v['visible']; | |
}); | |
Response::json($data); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment