Noget i den her retning
[pre]
</div>
<?
connect();
$hovedret='';$forret='';$dessert='';
$query = mysql_query("SELECT * FROM Retter ORDER BY id DESC");
while($row = mysql_fetch_array($query))
{
switch($row['type'])
case 'forret':{$forret.=' <a href="Menuer.php?id='.$row['id'].'" class="submenu">'.$row['overskrift'].'</a><br>';break;
case 'hovedret':{$hovedret.=' <a href="Menuer.php?id='.$row['id'].'" class="submenu">'.$row['overskrift'].'</a><br>';break;
case 'dessert':{$dessert.=' <a href="Menuer.php?id='.$row['id'].'" class="submenu">'.$row['overskrift'].'</a><br>';break;
default :{echo "kunne ikke finde plads til punktet";}
}
}
close();
echo '<div id="menu2" style="visibility:hidden">'.$forret.'</div><div id="menu3" style="visibility:hidden">'.$hovedret.'</div><div id="menu4" style="visibility:hidden">'.$dessert.'</div>';
?>
[pre]