Jump to content

PhP auto drop down menu


morvol

Recommended Posts

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

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  8)

 

it also depends on your definition of a 'dropdown menu'

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  8)

 

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 :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.