I am working on a website and that website and want to display categories > sub-categories > sub-sub categories.

Category is showing. But i wanna display sub-category too.

Here is category code

<select>
        <option>Select Category</option>
              <?php 
              $query="select * from mydb";
              $result=mysqli_query($connect,$query);
              while($r=mysqli_fetch_assoc($result))
              {
              ?>
        <option value="<?php echo $r['id']?>"><?php echo $r['title']?></option>                                    
  <?php } ?>
  </select>

Showing Like this & Wanna Displa Like this

Member Avatar for diafol

OK one's a select, the other a set of checkbox es. We need to know how your data is arranged in your db.

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.