我有两个mysql表
1. questions
2. answers
问题表有问题和答案表有相关的答案每个答案指向一个问题,所以它有级别
前任
question 1 -> answer 1 -> question 2
-> answer 2 -> question 3
-> answer 3 -> question 4 -> answer 1 -> question 5
-> answer 2 -> question 6
-> answer 3 -> question 7
question 8 -> answer 1 -> question 9
-> answer 2 -> question 10-> answer 1 ->question 12
answer 2 ->question 13
-> answer 3 -> question 11
我需要将问题显示为树视图
前任
question 1->question2
question3
question4->question 5
question 6
question 7
question 8->question 9
question 10->question 12
question 13
question 11
我的问题表字段是
id qtype qtext
我的答案表字段是
id answer quzid targetquz
任何人都知道如何基于这两个表使用 php 创建树视图。非常感谢您。