morvol Posted December 16, 2009 Share Posted December 16, 2009 i have a code for a single menu and i want to "convert" it to a drop down menu but i dont know how my code is : <table cellpadding="0" cellspacing="0" width="100%"> <tr> <?php global $CURUSER; print("<td class=\"header\" align=\"center\"><a href=\"index.php\">".$language["MNU_INDEX"]."</a></td>\n"); if ($CURUSER["view_users"]=="yes") { print("<td class=\"header\" align=\"center\"><a href=\"index.php?page=users\">".$language["MNU_MEMBERS"]."</a></td>\n"); print("<td class=\"header\" align=\"center\"><a href=\"index.php?page=staff\">".$language["STAFF"]."</a></td>\n"); } if ($CURUSER["view_news"]=="yes") print("<td class=\"header\" align=\"center\"><a href=\"index.php?page=viewnews\">".$language["MNU_NEWS"]."</a></td>\n"); if ($CURUSER["view_forum"]=="yes") { if ($GLOBALS["FORUMLINK"]=="" || $GLOBALS["FORUMLINK"]=="internal" || $GLOBALS["FORUMLINK"]=="smf") print("<td class=\"header\" align=\"center\"><a href=\"index.php?page=forum\">".$language["MNU_FORUM"]."</a></td>\n"); elseif ($GLOBALS["FORUMLINK"]=="smf") print("<td class=\"header\" align=\"center\"><a href=\"".$GLOBALS["FORUMLINK"]."\">".$language["MNU_FORUM"]."</a></td>\n"); else print("<td class=\"header\" align=\"center\"><a href=\"".$GLOBALS["FORUMLINK"]."\">".$language["MNU_FORUM"]."</a></td>\n"); } ?> </tr> </table> Thx in advantage Link to comment https://forums.phpfreaks.com/topic/185398-php-auto-drop-down-menu/ Share on other sites More sharing options...
mckennie Posted December 17, 2009 Share Posted December 17, 2009 ok, i tryed out your code and it cant find your $languages array also you probably cant do a dropdown menu with php but u probably can with javascript. if u fixup your code i will try to make a dropdown menu 4 you it also depends on your definition of a 'dropdown menu' Link to comment https://forums.phpfreaks.com/topic/185398-php-auto-drop-down-menu/#findComment-979004 Share on other sites More sharing options...
morvol Posted December 17, 2009 Author Share Posted December 17, 2009 ok, i tryed out your code and it cant find your $languages array also you probably cant do a dropdown menu with php but u probably can with javascript. if u fixup your code i will try to make a dropdown menu 4 you it also depends on your definition of a 'dropdown menu' what about if deleting the $language code ? and i mean a drop down menu . When i willl go on the index my mouse it will auto drop down with 2 sub categories inside Link to comment https://forums.phpfreaks.com/topic/185398-php-auto-drop-down-menu/#findComment-979025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.