PHP Scripts Development » Discuss our Web Development Tutorials

Dynamic (2 level) navigation list

(6 posts)

Great offers not only for geeks!


  1. User has not uploaded an avatar

    pfaguilar
    Member

    Hi,

    I've been testing your dynamic navigation list with PHP, but I can't seem to get it working. The main menu Level is listed but the code isn't "echoing" the sublevel.

    Thanks

    Best regards
    Pedro

    Posted 5 months ago #
  2. Check if your array is valid:

    print_r($sub_menu);

    Posted 5 months ago #
  3. User has not uploaded an avatar

    pfaguilar
    Member

    I've tried that and it listed an array of the submenus.

    I had to make some adaptations to the code so I could use my css menu.

    Anyway the initial code also made the same thing. It didn't print the submenus

    This is my code:

    Edit: I know my code :)
    Posted 5 months ago #
  4. Hi,

    First check if your arrays are not empty, and do your use exactly the same database structure?

    Posted 5 months ago #
  5. User has not uploaded an avatar

    pfaguilar
    Member

    I've used your "print_r($sub_menu);" and it printed the arrays.
    He lists the first level but not the second.

    And yes I'm using the same exact database structure.

    Anyway I believe the function works in your system and it lists the sublevels.

    Thanks.

    Posted 5 months ago #
  6. sure I use the same function on several site, check the keys and compare parent with the sub keys, it's only a little bit debugging ;)

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.