post] = $row->post; $customPostTypeTree["$parent_post"][$t]['thumbnail'] = get_the_post_thumbnail($row->this_post_id, 'cemXcem'); $customPostTypeTree["$parent_post"][$t]['this_post_id'] = $row->this_post_id; $customPostTypeTree["$parent_post"][$t]['post']['id'] = $row->the_post_id; $customPostTypeTree["$parent_post"][$t]['parent_post'] = $row->parent_post; $customPostTypeTree["$parent_post"][$t]['post']['name'] = $row->post; $t++; } $level++; } } $sql = "SELECT DISTINCT(parent_post) FROM $TABLE WHERE the_post_id='".$_GET['the_parent_post_tree_id']."'"; $result = mysql_query($sql); if ($result) { while ($row = mysql_fetch_object($result)) { $customPostTypeTree[$row->parent_post] = $row->parent_post; tree( $row->parent_post ); } } mysql_free_result($result); mysql_close($link); die; //} ?>