Yes, I noticed that link and examined that code they supply for subcategories.
The challenge here is to apply the categoryitems and subcategoryitems to the appropriate UL within the nested loop.
thanks
Main Topics
Browse All TopicsI have a function for creating a nested UL based on data in my MYSQL table
.... thanks shahzadfatehali for recent help
I want to format the UL so I can use it in the script for creating accordian menus
http://www.dynamicdrive.co
function createMenu1($parentid) {
$Result = mysql_query("SELECT * FROM tblcategory WHERE Status=1 and ParentCategoryID = '".$parentid."'");
$output = '';
if(mysql_num_rows($Result)
$output .= '<ul>';
while ($Row = mysql_fetch_assoc($Result)
$output .= '<li>'.$Row['CategoryName'
$output .= createMenu1($Row['Category
$output .= '</li>';
}
$output .= '</ul>';
}
mysql_free_result($Result)
return $output;
}
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Yes, I tried it
you'll notice in the code within http://www.dynamicdrive.co
it refers to "categoryitems" & "subcategoryitems".
it is specially this which is causig me the trouple
Hi shahzadfatehali:
sorry I was unavailable yesterday
I'm don't have any code that actually works
function createMenu1($parentid) {
global $objDB;
$SQL="SELECT * FROM tblcategory WHERE Status=1 and ParentCategoryID = '".$parentid."'";
//echo $SQL; die;
$rs=$objDB->select($SQL);
$output = '';
if(count($rs) > 0){
$output .= '<ul class="subcategoryitems">';
for($i=0;$i<count($rs);$i++
$output .= '<li><a href="index1.php?p=cms&CMS
$output .= createMenu1($rs[$i]['Categ
$output .= '</li>';
}
$output .= '</ul>';
}
return $output;
}
Here is a url in which the top menu cascades properly
http://www.bluelilyclients
Note that under 'about us' there are a number of submenu with tickmaks
The url also shows the attempted accordion menu
Business Accounts
Answer for Membership
by: shahzadfatehaliPosted on 2009-07-06 at 03:32:04ID: 24783852
Try this e.com/dyna micindex17 /ddaccordi onmenu- bul let.htm
the html generated by above code will work.
http://www.dynamicdriv
and