On Thu, Jan 6, 2011 at 11:05 AM, Wade Preston Shearer <[email protected]> wrote: > On 6 Jan 2011, at 10:59, Wade Preston Shearer wrote: > >> I have a recursive function that builds an array. No matter what I try the >> resulting array is multi-dimensional though. I want it flat. >> >> Here is the function, the results, and an example of the desired result: > > Clarification: my desired result is still a multi-dimensional array—I simply > want each node to be a sibling, instead of nested beneath the previous. >
Switch line 20 to: foreach (build_navigation_tree($db->data[0]['navi_parent']) as $x) $tree[] = $x; Alvaro -- http://www.alvarocarrasco.com _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
