hi all pls help me...
im trying to display categories and its sub categories... but i dont know how to display subcategory.. ijust only know to display the category.. i created two tables in the database named tbl_category and tbl_subcategory in both table the field cat_id is common....
here is my code for displaying category list..
<?php
$sql="Select * from tbl_category";
$obj->query($sql);
$nume=$obj->num_rows();
while($row=$obj->query_fetch()) {
$c_id = $row['cat_id']
?>
<ul>
<li><a href="products.php?cat_id=<?php echo $row['cat_id'];?>&name=<?php echo $row['cat_name'];?>"><?php echo $row['cat_name']; ?></a>
</li>
</ul>
<?php } ?>
pls help me to display sub category corresponding to the categorylist.
tnx in advnc..