If someone could point me in the right direction, it would save me a lot of time.
Thanks.

....
<{php}>
global $xoopsDB;
echo("0">mainmenu">");
$sql = $xoopsDB->query("SELECT groepid, naam FROM ".$xoopsDB->prefix("sgminhoud_groep")." WHERE inmainmenu = 1");
while (list($groepid,$naam)=$xoopsDB->fetchRow($sql))
{
echo("menuMain" href="/modules/sgminhoud/groep.php?groep=".$groepid."">".$naam."");
}
echo("
");
<{/php}>
td>....