时间:2021-07-01 10:21:17 帮助过:2人阅读
$questionfl=$page->pagesql("select * from questionfl where sid=false");//查找顶级分类
$q=0;
while($flrows=$questionfl->fetchRow()){
$listfl[$q]["id"]=$flrows["id"];
$listfl[$q]["name"]=$flrows["name"];
$questionsl=$page->pagesql("select * from questionfl where sid='".$listfl[$q]["id"]."'");//二级分类
$s=0;
while($slrows=$questionsl->fetchRow()){
$listsl[$s]["id"]=$slrows["id"];
$listsl[$s]["name"]=$slrows["name"];
$listsl[$s]["sid"]=$slrows["sid"];
$s++;
}
$q++;
}
{section name=listfl loop=$listfl}
{foreach item=listfl from=$listfl}