Links\n"; $getlinkedsql = "select link_ed from n_editorials"; $getlinked = mysql_query($getlinkedsql, $conn); $linked = mysql_fetch_array($getlinked); print $linked[0]; $getcatssql = "select distinct cat from n_links"; $getcats = mysql_query($getcatssql, $conn); print "

\n"; $first = true; while ($cats = mysql_fetch_array($getcats)) { if (!$first) { print " - "; }; print "" . $cats[0] . "\n"; $first = false; }; print "

\n"; $getcatssql = "select distinct cat from n_links"; $getcats = mysql_query($getcatssql, $conn); while ($cats = mysql_fetch_array($getcats)) { print "

" . $cats[0] . "

\n"; $getlinkssql = "select * from n_links where cat = '" . $cats[0] . "' order by indexer"; $getlinks = mysql_query($getlinkssql, $conn); while ($link = mysql_fetch_array($getlinks)) { print "

" . $link[title] . ""; if ($link[descr]) print " - " . $link[descr]; print "

\n"; }; }; ?>