Welcome Guest, Not a member yet? Register   Sign In
Coding Geniuses: Answer this Question Please (best answer gets $20)
#14

[eluser]christian.schorn[/eluser]
One other thing I noted: For this to work there can be only one top-level object.

(This was something I just explicitly checked for, because I have a similar problem but with several top-level objects (CS-speak: I don't have a tree, but a forest Smile))

But this is the easiest thing to fix:

Code:
// snip
$new_page_array = array();
foreach ($page_array as $page) {
  if (!isset($page->parent_thread)) {
    $new_page_array[$page->permalink] = $page;
  } else {
// snip

And just because it keeps bugging me, I'll try to find a way, where the order of the elements doesn't matter ...


Messages In This Thread
Coding Geniuses: Answer this Question Please (best answer gets $20) - by El Forum - 03-20-2008, 01:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB