"; while ($rows = mysql_fetch_row($result)) // Here we make the script keep making new rows until all the links in our database are shown, this is called a loop { echo "$rows[1]"; } // Finally we close off the table echo ""; //print all general links with subcategory? $result = mysql_query("SELECT * FROM links WHERE category = 'general' ORDER BY subcategory"); echo "General Links"; echo ""; ?>