title: Code for php navigation menu
body: <p>I have a website I manage for a mens clothing store, at www.malefashionsco.com.  On the home page, if you click one of the tuxedo categories, you'll see it says "category not found".  I have created the categories on the backend of the ecommerce platform, but they do not show.  There should be a page for each of the tuxedos, also, once in the category, the left sidebar menu should have the categories listed.  An example is at </p>
  
  <p><a href="http://www.malefashionsco.com/index.php?route=product/category&amp;path=9" rel="nofollow">http://www.malefashionsco.com/index.php?route=product/category&amp;path=9</a></p>
  
  <p>Here is the code for the menu:</p>
  
  <pre><code>&lt;div class="box"&gt;
  &lt;div class="box-heading"&gt;&lt;?php echo $heading_title; ?&gt;&lt;/div&gt;
  &lt;div class="box-content"&gt;
  &lt;div class="box-category"&gt;
    &lt;ul&gt;
      &lt;?php foreach ($categories as $category) { ?&gt;
      &lt;li&gt;
        &lt;?php if ($category['category_id'] == $category_id) { ?&gt;
        &lt;a href="&lt;?php echo $category['href']; ?&gt;" class="active"&gt;&lt;?php echo      $category['name']; ?&gt;&lt;/a&gt;
        &lt;?php } else { ?&gt;
  
        &lt;?php } ?&gt;
        &lt;?php if ($category['children']) { ?&gt;
        &lt;ul&gt;
          &lt;?php foreach ($category['children'] as $child) { ?&gt;
          &lt;li&gt;
            &lt;?php if ($child['category_id'] == $child_id) { ?&gt;
            &lt;a href="&lt;?php echo $child['href']; ?&gt;" class="active"&gt; - &lt;?php echo $child['name']; ?&gt;&lt;/a&gt;
            &lt;?php } else { ?&gt;
            &lt;a href="&lt;?php echo $child['href']; ?&gt;"&gt; - &lt;?php echo $child['name']; ?&gt;&lt;/a&gt;
            &lt;?php } ?&gt;
          &lt;/li&gt;
          &lt;?php } ?&gt;
          &lt;/ul&gt;
          &lt;?php } ?&gt;
          &lt;/li&gt;
         &lt;?php } ?&gt;
        &lt;/ul&gt;
       &lt;/div&gt;
     &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>PHP is not my strong suit.  What would the code look like to put in the <code>&lt;li&gt;</code> to create the links?</p>