I came to ask questions again, you heroes to help. About Smarty Display classification issues
I make a classification, there are top categories, level two classification
$QUESTIONFL = $page->pagesql ("select * from QUESTIONFL where sid=false");//Find top-level categories
$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]. "'"); /Level Two classification
$s = 0;
while ($slrows = $questionsl->fetchrow ()) {
$LISTSL [$s] [id]]= $slrows ["id"];
$LISTSL [$s] ["name"]= $slrows ["name"];
$LISTSL [$s] [SID]]= $slrows ["Sid"];
$s + +;
}
$q + +;
}
The HTML Smarty call can only repeat the last level two classification in the top-level category. Ask the Warrior to be femdom
{section NAME=LISTFL loop= $LISTFL}
-
{$LISTFL [Listfl].name}
-
{section NAME=LISTSL loop= $LISTSL}
{$LISTSL [listsl].name}|
{/section}
{/section} PHP Smarty Category Display
------Solution--------------------
{foreach Item=listfl from= $LISTFL}
-
{$LISTFL. Name}
-
{foreach Item=sub from= $listfl. Sub}
{$sub. Name}
------Solution--------------------
{/foreach}
{/foreach}