- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
<?
mysql_connect("localhost", "root",""); mysql_select_db("BD");
//$zapros=mysql_query("select * from test where id=0"); //echo ($zapros);
function menu($parent,$h) { $h++;
$zapros=mysql_query("select * from test where id={$parent}");
while($row=mysql_fetch_array($rezult)) { echo "{$row['name']}
";
$zapros1=mysql_query("select * from test where key={$row['id']}");
while ($row1=mysql_fetch_array($zapros1)){ echo "
{$row1['name']}
"; $p=$row1['id']; menu($p,$h);
}
}
}
menu(0,0);
?>
Batadase.
ммм
mmmmmm ....