Jump to content

Archived

This topic is now archived and is closed to further replies.

figster

How do I populate a CSS menu with php data?

Recommended Posts

My question seems like a simple one.. and yet I have had great dificulty finding the answer. I have a collapsable css menu design that I want to use on my article directory web site. The catagories are created in my admin section and sent to mysql data base and it returns a text catagory menu that looks awful. I am wanting to use a css menu to improve the look. How do I populate that menu with my catagory php data base?

Thanks,
Figster

Share this post


Link to post
Share on other sites
How are you outputting the text? Just what exactly are you using to output the first menu? Basically, all you need to do (if you want to do it like I would) is take all of the categories and create a list for each of them within the <li> tags of a master list. Then the links within the categories just come out of the database with an <a> tag and its contents.

Share this post


Link to post
Share on other sites
[!--quoteo(post=382648:date=Jun 11 2006, 04:54 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Jun 11 2006, 04:54 PM) [snapback]382648[/snapback][/div][div class=\'quotemain\'][!--quotec--]
How are you outputting the text? Just what exactly are you using to output the first menu? Basically, all you need to do (if you want to do it like I would) is take all of the categories and create a list for each of them within the <li> tags of a master list. Then the links within the categories just come out of the database with an <a> tag and its contents.
[/quote]

Thanks for your help, My catagories are for an article directory and will be changeing a lot as the site grows. So there will be parent catagories and children possibly 3 generations. The Table I am trying to poulate the catagory menu with is $catagories. I just can't seem to get the coding to work. The basic site came with this
<ul>
$catagories
</ul>

And that did create a text link list of all the catagories. When I try to add some style to it.. they disapear. I need the code that will populate my collapsable css driven menu. Maybe I should be posting in the php section?

I am certain I need a <div= name off css menu> ul {code} </ul></div>

The code is what I am missing.

Thanks, Jim

Share this post


Link to post
Share on other sites
"Basic Site"? Where did you get this stuff that you don't seem to fully understand? This doesn't sound like a CSS problem, it sounds like a PHP thing.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.