PHP Convert dinamic variable array to tree array : I have an array like:

    array(
        0 => array("a", "b", "c", ... n),
        1 => array("a", "b", "d", ... n),
        2 => array("e", "b", "c", ... n),
        .
        n
        );

With n lenght right and down.
I want an tree array like:

    a {
        b {
            c {null}
            d {null}
           }
      }
    e {
       b {
          c {null}
         }
      }

Extactly, something like:
http://stackoverflow.com/questions/3663096/how-to-convert-array-to-tree
but in PHP code and for 'n' lenght array