Search Results

Search found 1 results on 1 pages for 'btwong'.

Page 1/1 | 1 

  • Array with nested values. Display in ul list. php html.

    - by btwong
    i have a record set returned from a data base that is looking like this: id | level | lft | rgt | title --------------------------------- 1 |    | 1 | 8 | title 1 2 | -  | 2 | 5 | sub title 1-1 3 | -- | 3 | 4 | sub sub title 1 4 | -  | 6 | 7 | sub title 1-2 5 |    | 9 | 12 | title 2 6 | -  | 10 | 11 | sub title 2 AS you can see its a hierarchy list, with left n right values. I am trying to display this record set in a list with the correct indentation, so that it appears like this: Title 1 Sub title 1-1 Sub sub title sub title 1-2 Title 2 sub title 2 Any pointers to do this with the one record set? Or should i use multiple queries to display this?

    Read the article

1