Answer the question
In order to leave comments, you need to log in
How not to display an empty menu?
<?php if (isset($category['children'][$i]['level3'])) { $level3menus = $category['children'][$i]['level3']; ?>
<ul class="level3">
<?php foreach( $level3menus as $level3menu) {?>
<li><a href="<?php echo $level3menu['href']; ?>" class=""><?php echo $level3menu['name'];?></a></li>
<?php } ?>
</ul>
<?php } ?>
Answer the question
In order to leave comments, you need to log in
Add !empty, but just add, do not replace isset otherwise there will be an error in the absence of completely 3 levels
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question