Recursive tree traversal with mysql through PHP
I am creating a questionnaire for a client that requires the questions to be organized by 3 layers of levels. I've successfully created the U.I. however I've been trying for the last 3 hours to pull data from a database in such a way that everything loads in the right place. The database is organized like so by the client so I have no control over it: id description parentId 1 Level 1 0 2 Level 2 0 3 Level 1a 1 4 Level 1b 1 5 Level 1a1 3 I have found a similar question to mine on the site but when I attempted it's solution I got the following on repeat infinetly: Code: function makeList($par