title: reverse results of php recursive function
body: <p>I have wrote a php function to show the categories, all works find but the echo show as reversed like this (Chairs / Furniture / Products ), but i need it to be reversed to look like this (Products / Furniture / Chairs  )</p>
  
  <pre><code>    function sitemap($id) { 
      $query_rsCategoryId = "SELECT * FROM categories 
      WHERE category_id = '".$id."'";
      $rsCategoryId = mysql_query($query_rsCategoryId, $connection);
      $row_rsCategoryId = mysql_fetch_assoc($rsCategoryId);
      $parent = $row_rsCategoryId['category_parent'];
  
      echo '&lt;li&gt;&lt;span class="divider"&gt;/&lt;/span&gt;
      &lt;a href="products.php?category_id='.$row_rsCategoryId['category_id'].'"&gt;
      '.$row_rsCategoryId['category_name_en'].' &lt;/a&gt;
      &lt;/li&gt;';
  
      if ($parent == 0) {
      exit;
      } else {
      return sitemap($parent);
      }
  }
  </code></pre>