Aloha everybody,
I want to make a navigation frame, that builds trees (nodes and sons). It comes from a table and normally must be a recursive function. But I don´t know how to make it in PHP.
When i make it like this (see below) he ignores the first while loop.
It´s not so easy!BEWARE!!
But anyway thank you for your help.
See you ;-))
$getAll1=mssql_query("SELECT objid, this2parent, name, sort_order
FROM tNavigation
ORDER BY this2parent, sort_order");
$getAll2=$getAll1;
while ($row1=mssql_fetch_array($getAll1))
{
$objid1=$row1['objid'];
$this2parent1=$row1['this2parent'];
$name1=$row1['name'];
echo $objid1.$this2parent1.$name1."<BR>";
while ($row2=mssql_fetch_array($getAll2))
{
$objid2=$row2['objid'];
$this2parent2=$row2['this2parent'];
$name2=$row2['name'];
echo $objid2.$this2parent2.$name2."<BR>";
}
}