<div class="col-md-2 min_hts">

<h4 class="inner_bt" >  Categories</h4>

<ul class="side_ul" >
<?php  $id=''; if($result): foreach($result as $row):  ?>
<li ><a href="<?php echo site_url( 'Product/category_list/'.$row['id'].'/'.url_title($row['title'], '-', TRUE) ) ; ?>"> 
<?php echo (strlen(strip_tags($row['title']))>20)?substr(strip_tags($row['title']),0,20).'...':strip_tags($row['title']);?></a>



<ul class="inner_ul">


<?php

$catid=$row['id'];
$sql ="SELECT * FROM shop_subcategory where `category_id`='$catid'";
$query = $this->db->query($sql);
if ($query->num_rows() > 0) {
foreach($query->result() as $rows) { ?>
<li><a href="<?php echo site_url( 'Product/subcategory_list/'.$rows->id.'/'.url_title($rows->title, '-', TRUE) ) ; ?>">
<?php echo $title=$rows->title; echo $row['id']; ?></a></li>
<?php

}
}
?>
</ul>

  


</li>
<?php  endforeach; endif; ?> 
</ul>


<img src="<?php echo base_url('assets/website/images/side1.jpg');?>" class="max-widtho" >

<img src="<?php echo base_url('assets/website/images/side2.jpg');?>" class="max-widtho" >




</div>