I'm trying to do a resturant website with PHP. I'm trying to make our menu editable via admin interface. Field 1 is called [b]ID[/b], Field 2 is called [b]DESCRIPTION[/b], and Field 3 is called [b]PRICING[/b]. What I'm trying to do is seperate each row by their [b]ID[/b]. For example: SOUPS [EDIT] Item 1 [EDIT] Item 2 APPETIZERS [EDIT] Item 1 [EDIT] Item 2 ---- ETC ---- This is their ID groups. [code]+Field 1 1 = soups 2 = salads 3 = appetizers 4 = entrees 5 = sushi 6 = a la carte 7 = dessert 8 = beverages +Field 2 Description +Field 3 Pricing[/code] And this is my current code so far: [code] <?php if ($_GET['act'] == 'sushi') { $getList = $sql->query("SELECT id, description, pricing FROM sushi " . " ORDER BY id ASC") or die('Could not connect to the database!'); $admin->html .= html_list_start(); while ($soupResult = $sql->fetch_array($getList)) { $admin->html .= html_list_result($soupResult); } $admin->html .= html_list_end(); } function html_list_start() { return <<<HTML <br> <div class="thead">» Drunken Fish Sushi Menu </div> <div> <table class="intable"><br> HTML; } function html_list_result($soupResult) { return <<<HTML <tr> <td class="content">{$soupResult['description']}</td> </tr> HTML; } function html_list_end() { return <<<HTML </table></div> HTML; } ?> [/code] I know it seems messy and unfinished, but I just need to know how to sort by ID and print each groupings seperately. Thanks for any assisstance. Criticism is welcome.