help build a dynamic parent-child-subchild menu in php
Hello, I would like to build a menu system in php only, without any jquery or ajax, where the menus will be read from a table in my db and populated in different divs when loaded.
The primary menus will be loaded in a "primary-block", and if a primary menu is activated and has a child menu, then the child must be loaded in a block "child-block". If the child has a url link, then it opens that link, else if it has a child of its own, then it must load the latter in the "subchild-block".
Attached are 2 files, one for the table structure, and one with a sample parent-child-subchild data, where the first column is the menuid, then the menu name, a sorting value to display the order, and the column before last being the one which keeps track of the parent menuid.
How can I proceed with this in an MVC fashion?