In my php pages I use an include to call a file that contains my menu:
<?php include('../../sidebar-menu.php'); ?>
Menu file:
<ul class="sidebar-menu" id="nav-accordion">
<?php
foreach ($lista as $key => $value) {
echo '<li class="mt">
<a href="/view/DadosIndicadores/index.php?id_tipo='.$lista[$key]['id'].'">
<i class="fa fa-bar-chart-o"></i>
<span>'.$lista[$key]['nome'].'</span>
</a>
</li>';
}
?>
</ul>
How do I insert the class active only in the menu accessed?