Jump to content

help in displaying data


bapi

Recommended Posts

hi,

 

i want to display some information in formate of 1 -> 3->9 .........

 

I have site in which in need to display list of people in chain. That mean that a person have chain of peoples below him. like

 

 

                1

        1      2        3

    1 2 3  1 2 3  1 2 3

 

.....................................

 

Now, how can i display all the members present below "1" in one page.

 

Any help will be great full

Link to comment
Share on other sites

Try with recursion, for example

 

function display_childs($id)

{

    // here goes a function to get array and print all the childs of $id if it has childs, if it hasn't - return.

    // after that for every child of $id you call function display_childs()

 

//for example:

    foreach($childs as $key=>$value)

      function display_childs($value);

}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.