PHP MySQL tree - array

please help me to get array of nodes.
such as this:

site point method does not get me an array.

need a function to get array of nodes.

thank so much

One of the problems I have it that many times I just post code. That makes it extremely difficult to search for keywords that may make it easy to locate at a later date. That is most likely the case with the function I’m describing because I can not seem to find it!

so where can find this function ? :smiley:

There is a algorithm somewhere on this forum that I posted which accepts a array and transforms it into a hierarchy. However, I’m having some difficulty finding it. It would be perfect for what you want to do and only requires a single query vs. multiples for every level. Maybe if I look like a little harder I’ll find it considering god only knows were it would be located or if I even have it somewhere on my computer.

I use first method but i need to a function to get all nodes as an array.

Which of the two methods are you using?

Are you looping through the result set to read them into an array?