PHP make navigation tab active dynamically

0
1134
<li <?php if($_SERVER['REQUEST_URI'] == "/index.php" || $_SERVER['REQUEST_URI'] == "/"){echo 'class="active" ';}?> >
                            <a href='index.php'>Home</a>
                        </li>

LEAVE A REPLY

Please enter your comment!
Please enter your name here