On Mon, Feb 23, 2009 at 11:12 PM, Ajai Khattri <a...@bitblit.net> wrote: > On Mon, 23 Feb 2009, Tim Lieberman wrote: > >> Yup, your standard depth-first tree traversal. > > But in order to build a flat array, I'd have to pass that by reference > into my recursive function so it can append the each node right? >
You could use array_merge() on the way out. Do you want to preserve keys, or can you handle getting back a numerically indexed array? -- justin http://justinhileman.com _______________________________________________ New York PHP User Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/show_participation.php