0
我有這樣的數據庫的數組。我想把數組放到這樣的菜單中。如何從數組創建菜單
- 設置
- 菜單類別
- 菜單分類視圖
- 集團
- 組視圖
個
- 存款
- 組菜單
- 組菜單查看
- 菜單
- 菜單查看
- 菜單類別
- ETC
我一直在努力,但到目前爲止一切嘗試失敗
array(
(int) 0 => array(
'MenuCategory' => array(
'name' => 'Setting'
),
'Menu' => array(
'name' => 'Menu Category',
'url' => '/menu_categories/adding',
'parent_id' => null
),
'Site' => array(
'id' => (int) 1
),
'Sub' => array(
'name' => 'Menu Category View',
'url' => '/menu_categories/view'
)
),
(int) 1 => array(
'MenuCategory' => array(
'name' => 'Setting'
),
'Menu' => array(
'name' => 'Group',
'url' => '/groups/adding',
'parent_id' => null
),
'Site' => array(
'id' => (int) 1
),
'Sub' => array(
'name' => 'Group View',
'url' => '/groups/view'
)
),
(int) 2 => array(
'MenuCategory' => array(
'name' => 'Setting'
),
'Menu' => array(
'name' => 'Deposits',
'url' => '/Deposits/requestTiket',
'parent_id' => null
),
'Site' => array(
'id' => (int) 1
),
'Sub' => array(
'name' => null,
'url' => null
)
),
(int) 3 => array(
'MenuCategory' => array(
'name' => 'Setting'
),
'Menu' => array(
'name' => 'Group Menus',
'url' => '/group_menus/adding',
'parent_id' => null
),
'Site' => array(
'id' => (int) 1
),
'Sub' => array(
'name' => 'Group View',
'url' => '/group_menus/view'
)
),
(int) 4 => array(
'MenuCategory' => array(
'name' => 'Setting'
),
'Menu' => array(
'name' => 'Menu',
'url' => '/menus/adding',
'parent_id' => null
),
'Site' => array(
'id' => (int) 1
),
'Sub' => array(
'name' => 'Menu View',
'url' => '/menus/view'
)
)
);
任何人都可以幫助我嗎? ?
我有一個問題是,如果'Group'是一種有兩個子菜單,然後如何數組會是什麼? 1)它是'Menu'爲'Group'的另一個數組,'Sub'僅在Sub中具有信息(OR)2),具有多個數組,如'Sub'=> array(array('name'=> ...),array('name'=> ...))' –