プライベート関数Fndotoarea($oid){
$oid = $this->CHTID($oid);
$arrtaff = array();
$arrt =array( );
$arrr = array();
foreach($this->select("SELECT areaname , tid FROM otoarea WHERE oid = '".$oid."' " ) as $ks){
$arrr= Array ("node"=>$ks["エリア名"],"値"=>$ks["tid"]);
foreach ($this->select("select エリア名 , tid FROM otoarea WHERE oid = '".$ks["tid"]."' ") as $kr){
$arrr['nodes'][] = Array("node"=>$kr["areaname"],"value" =>$kr["tid"]);
}
$nodes = $this->Fndotoarea($ks["tid"]);
if(!empty($nodes)){
$arrr["ノード"] = $nodes;
}
array_push($arrtaff, $arrr);
}
return $arrtaff;
}
/*----------------------------------------------- --------------*/
プライベート関数 Fndotoarea($oid){
$oid = $this->CHTID($oid);
$arrtaff = array();
$arrt =array();
$arrr = array();
foreach ($this->select("SELECT エリア名 , tid FROM otoarea WHERE oid = '".$oid."' " ) as $ks){
$arrr= Array("node"=>$ks["エリア名"],"value"=>$ks["tid"]);
foreach ($this->select("select areaname , tid FROM otoarea WHERE oid = '".$ks["tid"]." ' ") as $kr){
$arrr['nodes'][] = Array("node"=>$kr["areaname"],"value"=>$kr["tid"]);
}
$nodes = $this->Fndotoarea($ks["tid"]);
if(!empty($nodes)){
$arrr["nodes"] = $nodes;
}
array_push( $arrtaff, $arrr);
}
return $arrtaff;
}