-2
I created a navigation system for my site. See:
<nav class="navegacao" id="navegacao">
<ul class="menus">
<li><a href="#">Categoria 1</a></li>
<li><a href="#">Categoria 2</a>
<ul class="submenus">
<li><a href="#">Sub-categoria 1</a></li>
<li><a href="#">Sub-categoria 2</a></li>
<li><a href="#">Sub-categoria 3</a>
<ul class="submenus">
<li><a href="#">Sub-categoria 1-1</a></li>
<li><a href="#">Sub-categoria 1-2</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Categoria 3</a></li>
</ul>
</nav>
I left this Dynamic navigation system creating a PHP function called list_categories() that generates navigation using Mysql. See:
Worked!!
There is only one problem that I am not able to solve, this being added the excerpt <ul class="submenu"></ul>
even though there’s nothing to list inside it.
Can someone help me solve?
From now on, thank you!
Thanks!! I’m still starting to post things here, so I’m not used to it yet. But next time I’ll do it yes! Ahhh, and on the Array, I made a version, but I don’t know why it only generates 1 level. I’ll see if it puts here for you to see
– marcos vinícius mesquita