|
楼主 |
发表于 2014-6-23 12:59:27
|
//网站导航
$menu = $type->where('ismenu=1')->order('drank asc')->select();
foreach( $menu as $k=>$v)
{
$menuson[$k] = $type->where('fid='.$v['typeid'].' and drank <> 0')->order('drank asc')->select();
$menu[$k]['submenu'] = $menuson[$k];
}
foreach($menu as $key=>$val)
{
if(is_array($menu[$key]["submenu"]))
{
foreach($menu[$key]["submenu"] as $k=>$v)
{
$menuson_s[$s] = $type->where('fid='.$menu[$key]["submenu"][$k]['typeid'].' and drank <> 0')->order('drank asc')->select();
$menu[$key]['submenu'][$k]["submenu"] = $menuson_s[$s];
}
}
}
把大米的菜单改了下,加了下一级, 现在头部就可以调用成三级了 |
|