What's wrong with the following code? I would like to dynamically insert "current" CSS class when the respective <li>
element is clicked. Thanks!
<?php
$pg = $_SERVER['PHP_SELF'];
?>
<section>
<aside>
<nav>
<ul>
<li class="<?php if($pg == 'index.php?page=about.php'){echo 'current';} ?>"><a href="index.php?page=about.php">About</a></li>
<li class=""><a href="">Services</a></li>
</ul>
</nav>
</aside>
<section>