showing tree

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
angelena
Forum Commoner
Posts: 53
Joined: Mon Nov 22, 2004 4:10 am

showing tree

Post by angelena »

i would like to display my data in tree form .

The case is such as i will first display type of classes.
when click on the classes folder will display subject offer
click on subject will show lecturer involve..something like that

Class
>Subject
>>Lecturer

I duno how to put my data in order to haf it display as a tree form.
Sorry if my explanation is kinda confusing :oops:
srinu
Forum Newbie
Posts: 2
Joined: Fri Dec 10, 2004 6:23 am
Location: Hyderabad
Contact:

Post by srinu »

hi

do you want to display it using PHP or HTML.
if you want display it automatically with out reloading the page, then you have to use the HTML tags div so that when the user clicks on some class
you can hide all and show that class.

or else the best way is using the PHP loops.
first diplay the classes. when the user requested class and displayed class are same then display the data over there in a different table.

:)
thanks
Srinivas
angelena
Forum Commoner
Posts: 53
Joined: Mon Nov 22, 2004 4:10 am

Post by angelena »

Hi Srinu :)

emm..but the prob is im bit confuse how to get the data display in sequence...huhh
i think i will prefer to have it in PHP code

thx ya :)
srinu
Forum Newbie
Posts: 2
Joined: Fri Dec 10, 2004 6:23 am
Location: Hyderabad
Contact:

Post by srinu »

hi

first take all the classes you have read into a record set.

then write another loop for each class you have by quering the subject for the single class.
display all the subjects with in that class.

and even for the lectirer & etc also follow the sanme principle.

here first take a table for the class loop

and then with in the class <tr> take one more table to display the subjects for that class.

Srinivas
Simon
Forum Newbie
Posts: 12
Joined: Sun Dec 12, 2004 11:36 pm

Post by Simon »

Not sure if this is helpful at all, but I love it...
http://www.destroydrop.com/javascripts/tree/

< Simon >
Post Reply