Answers for "php show active page"

PHP
0

php show active page

$activePage = basename($_SERVER['PHP_SELF'], ".php");
Posted by: Guest on October-03-2020
0

php show active page

<ul class="nav navbar-nav">
      <li class="<?= ($activePage == 'index') ? 'active':''; ?>"><a href="index.php">Home</a></li>
      <li class="<?= ($activePage == 'contact-us') ? 'active':''; ?>"><a href="contact-us.php">Contact</a></li>
</ul>
Posted by: Guest on October-03-2020

Browse Popular Code Answers by Language