tankgong
0
Q:

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>
0
$activePage = basename($_SERVER['PHP_SELF'], ".php");
0

New to Communities?

Join the community