<div class="box">
  <div class="box-heading-categories"></div>
  <div class="box-content-categories">
    <ul class="box-category-categories">
      <?php foreach ($categories as $category) { ?>
      <?php if ($category['category_id'] == $category_id) { ?><li>	
		  <a href="<?php echo $category['href']; ?>" class="active"><?php echo $category['name']; ?></a></li>
		 <?php } else { ?>
		  <a href="<?php echo $category['href']; ?>" style="display:none;"><?php echo $category['name']; ?></a>
		  <?php } ?>
	  <?php if ($category['category_id'] == $category_id) { ?>
        <?php if ($category['children']) { ?>
        <ul>
          <?php foreach ($category['children'] as $child) { ?>
          <li>
            <?php if ($child['category_id'] == $child_id) { ?>
            <a href="<?php echo $child['href']; ?>" class="active"> - <?php echo $child['name']; ?></a>
            <?php } else { ?>
            <a href="<?php echo $child['href']; ?>"> - <?php echo $child['name']; ?></a>
            <?php } ?>
          </li>
          <?php } ?>
        </ul>
       <?php } ?>
      	<?php } ?>
      <?php } ?>
    </ul>
  </div>
</div>
