title: How do I format Nested Set Model data into an array?
body: <p>Let's dig in the main problem right away, I have the input like this</p>
  
  <pre><code>$category = array(
    'A' =&gt; array('left' =&gt; 1, 'right' =&gt; 8),
    'B' =&gt; array('left' =&gt; 2, 'right' =&gt; 3),
    'C' =&gt; array('left' =&gt; 4, 'right' =&gt; 7),
    'D' =&gt; array('left' =&gt; 5, 'right' =&gt; 6),
    'E' =&gt; array('left' =&gt; 9, 'right' =&gt; 10),
  );
  </code></pre>
  
  <p>I want the output to be something like this</p>
  
  <pre><code>$tree = array(
    array('A', 'B'),
    array('A', 'C', 'D'),
    array('E'),
  );
  </code></pre>
  
  <p>which one is the best and fast function to loop though the input array and create the output result like this ?</p>