データを変換する関数を作成します
$array = array(
0=>array("","Hebei"),
1=>array("","Beijing"),
2=> array (0,"保定"),
3=>array(1,"海淀"),
4=>array(3,"中関村"),
5=>array(2,"涌州")
; $con = null
foreach ($array as $k=>$v){ "|" : $k."|"
asort($na) // 並べ替え foreach ($ na as $k=>$v){
$s = substr_count($v,"|" );
$con .= str_repeat("-",($s-1)).$array[$k] [1]."n";
http://www.bkjia.com/PHPjc/327956.html