I am trying to write this code to draw out this very simple tree, but i just do not know for sure how i should use the loops and what not. My table in the db just has id, parent, subject, contents. I want to write some code so that the first record pulled is
where parent = "0"
, and then all of their children are pulled, that way I can display all the children under the parent and like 2 spaces to the right to make it visibly clear. From there the children might have children, and so on. Then I want to go back to the top and grab the next record
where parent = "0"
and contine. If someone could help me with this code, that woudl be great! Thanks!
Jason