views:

200

answers:

1

Hi,

I'm using Doctrine NestedSet behavior. I'd like to render the tree using php to <ul>'s and <li>'s

Here's an example of what the output might be:

<ul>
  <li>Node 1</li>
  <li>Node 2
       <ul>
         <li>Child 1 of Node 2</li>
         <li>Child 2 of Node 2
              <ul>
                 <li>Another Child</li>
                 <li>Yet Another Child</li>
              </ul>
         </li>
       </ul>
     </li>
   <li>Node 3</li>
</ul>

What is the best way to do this?

A: 
geek1983