title: php recursive get parents
body: <p>I am trying to get jquery.treeview.js to fold out to the just created folder. Think I need an array of "parents" to set class to "open".</p>
  
  <p>Other suggestions works with me ;-) (find this a bit too much but cannot find another way to do it.</p>
  
  <p>Having an array like this:</p>
  
  <pre><code>    array(7) {
        [126]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(3) "126"
          ["folder_name"]=&gt;
          string(3) "555"
          ["folder_parent"]=&gt;
          string(3) "125"
        }
        [2]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(1) "2"
          ["folder_name"]=&gt;
          string(14) "Administration"
          ["folder_parent"]=&gt;
          string(1) "1"
        }
        [7]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(1) "7"
          ["folder_name"]=&gt;
          string(5) "Britt"
          ["folder_parent"]=&gt;
          string(1) "2"
        }
        [4]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(1) "4"
          ["folder_name"]=&gt;
          string(9) "Documents"
          ["folder_parent"]=&gt;
          string(1) "3"
        }
        [3]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(1) "3"
          ["folder_name"]=&gt;
          string(14) "Infrastructure"
          ["folder_parent"]=&gt;
          string(1) "1"
        }
        [1]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(1) "1"
          ["folder_name"]=&gt;
          string(4) "root"
          ["folder_parent"]=&gt;
          string(1) "0"
        }
        [125]=&gt;
        array(4) {
          ["folder_id"]=&gt;
          string(3) "125"
          ["folder_name"]=&gt;
          string(13) "test-deleteme"
          ["folder_parent"]=&gt;
          string(1) "7"
        }
      }
  </code></pre>
  
  <p>I would like to get the parents from selected folder_id.</p>
  
  <p>getting data for folder_id=126 should return an array with parents {1,2,7,122}</p>
  
  <p>Anyone?</p>