Showing categories and subcategories in a menu
<p>What is the best way for Showing categories and subcategories in a menu with php?
I have found a function <a href="http://www.codeassembly.com/How-to-display-infinite-depth-expandable-categories-using-php-and-javascript/" rel="nofollow">here</a>, But I cant understand the logic of $has_childs .
why</p>

<pre><code> $has_childs = false;
</code></pre>

<p>and then</p>

<pre><code> if ($has_childs === false)
     {
         $has_childs = true;

     }
</code></pre>

<p>?         </p>

<p>Thanks in advance</p>
