Forum Moderators: coopster
Here is my code to gather my menu along with its style
$menuDisplay .= '<ul class="MenuBarVertical"><li><a href="categories.php?catid='. $cid .'">'. $name .'</a></li></ul>';
the trouble is with the </ul> which is echoing after each menu link so i have a space inbetween each menu link
would it be easier if i used a tabbed panel group
any help would be greatly appriciated.
$menuDisplay = '<ul class="MenuBarVertical">';
$query = "select cat_id,cat_title from categories order by name";
$result=@mysql_query($query);
if (!$result) { echo "No categories available"; }
while ($row=mysql_fetch_array($result)) {
$cid = $row[0]; // or $row['cat_id']
$name = $row[1]; // or $row['cat_title']
$menuDisplay .= '<li><a href="categories.php?catid='. $cid .'">'. $name .'</a></li>';
}
mysql_free_result($result);
$menuDisplay.= '</ul>';
Example how i would like it to display
LPG (GAS)
ELECTRIC
REACH TRUCKS
Here is how it is displaying
LPG (GAS)
ELECTRIC
REACH TRUCKS
Any ideas because im lost as im not brilliant at php