0

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 =(

Edited by pritaeas: Closed.

2
Contributors
6
Replies
21
Views
4 Years
Discussion Span
Last Post by pritaeas
0

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

0

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 =(