时间:2021-07-01 10:21:17 帮助过:10人阅读
function dafenglei_arr($m,$id)
{
global $class_arr;
global $ppid;
if($id=="") $id=0;
$n = str_pad('',$m,'-',STR_PAD_RIGHT);
$n = str_replace("-"," ",$n);
for($i=0;$i
if($class_arr[$i]['classFID']==$id){
echo "\n"; \n";
echo "".$n."|--".$class_arr[$i]['className'].$m." \n";
echo "
dafenglei_arr($m+1,$class_arr[$i]['classid']);
}
}
}
$ar = array (
2 =>
array (
'classid' => '6',
'classfid' => '0',
'classname' => '栏目一',
),
1 =>
array (
'id' => '7',
'classfid' => '6',
'classname' => '栏目1-1',
),
0 =>
array (
'classid' => '10',
'classfid' => '7',
'classname' => '栏目1-1-1',
),
);
echo '