Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 118787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:32:59+00:00 2026-05-11T03:32:59+00:00

So the final menu will look something like this: Item B Item B-1 Item

  • 0

So the final menu will look something like this:

Item B     Item B-1         Item B-1-2         Item B-1-1 Item A     SubItem A-1     SubItem A-2 Item C 

Based on the following DB records:

id        menu_title          parent_menu_id    menu_level    weight 1         Item A                0                           1                     1 2         Item B                0                           1                     0 3         Item C                0                           1                     2 4         SubItem A-2       1                           2                     1 5         Item B-1             2                           2                     0 6         Item B-1-1          5                           3                     1 7         SubItem A-1       1                           2                     0 8         Item B-1-2          5                           3                     0 

How would I go about displaying? My guess is it’ll involve storing all the items into a multidimensional array, then looping through it somehow…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T03:33:00+00:00Added an answer on May 11, 2026 at 3:33 am

    Dealing with the data structure as you have it will often involve recursion or multiple queries to build the tree.

    Have you considered other ways of storing a hierarchy? Check out modified pre-order traversal – here’s a nice PHP based article about this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've seen examples like this: public class MaxSeconds { public static final int MAX_SECONDS
When I click on a menu item I am presented with the following message
Final question for the night. And apologies for the complete noobness of this. I
I have a ListView that will allow the user to long-press an item to
I have this menu example But in this example new activity is not called,
I found this example where they used PowerMock and EasyMock to stub/mock the Menu
I have the following code to layout the menu for my page: //Header Conainer
I am using MenuBuilder with code like this: public static MenuItem MainMenu(UrlHelper url) {
I am using the the following code for a context menu and then if
Im have made a navigation bar for the top of site, the final look

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.