<?php
function do_tree($arr,$pid){
echo "<ul>";
foreach ($arr as $key => $value) {
if($value[‘pid‘]==$pid){
echo "<li>";
echo $value[‘area‘];
echo "</li>";
do_tree($arr,$value[‘id‘]);
}
}
echo "</ul>";
}
?>
时间: 2024-10-11 00:46:31