i now have this code:
$menuquery = "SELECT * FROM zc_categorie WHERE parent='$id' ORDER BY volgorde ASC";
$result=mysql_query($menuquery) or die('An error occured retrieving data');
$listing = Array();
while($row = mysql_fetch_array($result)) {
$listing[]=array("cat_id" => $row[id],
"cat_name" => $row[categorie],
"cat_parent" => $row[parent],
"cat_volgorde" => $row[volgorde]
);
}
function display_tree($parent, $level, $array, $path) {
foreach ($array AS $node)
if($node[cat_parent]==$parent) {
$html .= "<a class='menu".$level."' href='#'>".$node[cat_name]."</a>";
$html .= display_tree($node[cat_id], ($level + 1), $array, $path);
}
return $html;
} // end display list
// Now use it
$menu = display_tree(0, 0, $listing, $baseurl);
but it show nothing, no error no output.
i also tried putting in - print "$menu"; and print_r "$menu"; but that dont work either