I want to create a menu from category names in database, so far I have this:
$list = "SELECT category FROM posts";
$rlist = mysql_query($list) or die(mysql_error());
while($rows = mysql_fetch_assoc($rlist))
{
$catname = $rows['category'];
echo '<li><a href="' . $url . '/index.php?cat=' . $catname . '">' . $catname . '</a></li>';
}
Which lists everything but I need to make each only list once so its a menu.
Maybe you want
And assuming you want them ordered