开发者

Showing categories and subcategories in a menu

What is the best way for Showing categories and subcategories in a menu with php? I have found a function here, But I cant understand the logic of $has_childs . wh开发者_如何学编程y

 $has_childs = false;

and then

 if ($has_childs === false)
     {
         $has_childs = true;

     }

?

Thanks in advance


That variable means if the main link has any sub-categories. For example, a 'home' button would not have a dropdown, in other words, no child elements related to it. Whilst anything that did have a dropdown WOULD have child elements.

For more information you should google Parent/Child terminology in web programming.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜