************************************************************************************************************ $q_menu = mysql_query("SELECT * FROM `categorii` ORDER BY `cat_order` ASC"); while($menu = mysql_fetch_assoc($q_menu)){ if ($menu['cat_parinte'] == 0) { $menu_items[] = $menu; } if ($menu['cat_parinte'] > 0) { $submenu_items[] = $menu; } } // while $smarty->assign("submenu_items", $submenu_items); $smarty->assign("menu_items", $menu_items); $smarty->assign("path", PATH); $smarty->display(TEMPLATE.'/index.tpl.htm');