Hi, How can I add ul and li tag and add <span class="subDropdown plus"></span> before sub category <ul> called? ?
my database: ID,CatName,ParentID

This is the output I expected:

<ul>
                <li><a href="#">Car Accessories</a></li>      
                <li><a href="#">Clothing & Shoes</a>
                    <span class="subDropdown plus"></span>
                    <ul>                    
                      <li><a href="#">Shoes</a></li>
                      <li><a href="#">Sndals</a></li>
                      <li><a href="#">Dresses</a></li>
                      <li><a href="#">Jeans</a></li>                    
                    </ul>                  
                  </li>
                  <li><a href="#">Kids Toys</a></li>                
                  <li><a href="#">Digital Games & Softwares</a></li>
</ul>

Please help me. I'm new to php programming =(

it is just a small spacing between UL and LI

erm...the html template design is like this but I don't know how to loop in mysql while loop =(

any solution to loop UL and LI? sub category contain like this

<li><a href="#">Clothing & Shoes</a>
                    <span class="subDropdown plus"></span>
                    <ul>                    
                      <li><a href="#">Shoes</a></li>
                      <li><a href="#">Sndals</a></li>
                      <li><a href="#">Dresses</a></li>
                      <li><a href="#">Jeans</a></li>                    
                    </ul>                  
                  </li>

Please help me =(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.