Hello, I was wondering how I would convert an existing structure to a tree. What I want is basically a family tree. What I have is the following:

array (

array(id => 123, p1 => 567, p2 => 765),
array(id => 321, p1 => 567, p2 => 890),
array(id => 333, p1 => 123, p2 => null),
array(id => 444, p1 => null, p2 => null),
etc.

);

It's...