"; $i++; foreach ($data[$parent] as $v) { $child = get_menu($data, $v->id); $html .= "\n\t$tab
  • "; $html .= ''.$v->title.''; if ($child) { $i--; $html .= $child; $html .= "\n\t$tab"; } $html .= '
  • '; } $html .= "\n$tab"; return $html; } else { return false; } } mysql_connect('localhost', 'root', 'power'); mysql_select_db('menu3'); $result = mysql_query("SELECT * FROM menu ORDER BY menu_order"); while ($row = mysql_fetch_object($result)) { $data[$row->parent_id][] = $row; } $menu = get_menu($data); ?> Barnyard by Free CSS Templates