Skip to content

Instantly share code, notes, and snippets.

@BlackScorp
Created March 8, 2013 09:35
Show Gist options
  • Save BlackScorp/5115306 to your computer and use it in GitHub Desktop.
Save BlackScorp/5115306 to your computer and use it in GitHub Desktop.
output
//Controller/Action
$menu = array(
'brands'=>array(
'brand1'=>array(
'category1'=>array(
'item1'=>'name'
)
)
)
)
$view->menu = json_decode($menu);
//view
var menu = {};
menu = <?= $menu; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment