Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP tree menu

Status
Not open for further replies.

lonelydragon

Programmer
Joined
Aug 5, 2004
Messages
75
Location
US
i need some help to write a program dispaly the folders as a tree menu. thank you in advance.
 
To add to what sleipnir said, you could recursively call a function (but you might want to put a limit on the number of iterations - just as a rule). Every time is_dir() returns true, call the function from within itself. That way, you can create a table each time and indent inside the cell of the parent table to mimic a tree structure.

This is obviously a simple implementation, but it works.
 
Could some one give me a hint how to use trees in PHP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top