you said that you are not getting $pid value. change $pid name if use pid already in the file it willnot store value change it's name try once .
and also check where parentId have the value or not in db. check parentIDN name in db also.

you said that you are not getting $pid value. change $pid name if use pid already in the file it willnot store value change it's name try once .
and also check where parentId have the value or not in db. check parentIDN name in db also.

No Friend.
This is Getting pid from Database but Not Store in Array witch is on Line #56 in index.php File.

Thanx for Your Help but The above Posted Code is for Tree Printing. if There are not Store $pid value in Array The Tree Sould Work but The Expend Collapse Feature not Working and Not Show + sign before Parent Node. so for This Displaying you need to assign $pid.

if we select whole table then the code is work but when we select the data with recursion function this will not work this only store first two variable in database ie $id,$name or $id,$parentID.
You may Tested it from the code posted on first page.
this will give u error.....