I have a single-table with the following (relative) structure:
foo_id, parent_foo_id, foo_name
I would like to build an (effectively) infinite-depth recursive array with these entities, and consequently output them into a tree menu. Nodes with no "parent_foo_id" would be considered at the top of the heirerchy, while all successive nodes would appear as children of their parent.
What is the best method for approaching this type of data design?