<?phpfunction 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>";}
?>