On Click Link Active With PHP

PHOTO EMBED

Wed Jul 20 2022 09:25:40 GMT+0000 (Coordinated Universal Time)

Saved by @imran1701 #code #html #php

<ul class="navbar-nav mx-auto">
  <li class="nav-item ">
  		<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='index.php'){ ?>active <?php } ?>" href="index.php">Home  </a>
  </li>
  <li class="nav-item">
  		<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='mestropolis.php'){ ?>active <?php } ?>" href="mestropolis.php">Neotropolis</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='story.php'){ ?>active <?php } ?>" href="story.php">Story</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='cards.php'){ ?>active <?php } ?>" href="cards.php">Cards</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='packs.php'){ ?>active <?php } ?>" href="packs.php">Packs</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='Collectibles.php'){ ?>active <?php } ?>" href="Collectibles.php">Collectibles</a>
  </li>
  <li class="nav-item">
    	<a class="nav-link <?php if(substr($_SERVER['PHP_SELF'],1,15)=='faq.php'){ ?>active <?php } ?>" href="faq.php">FAQ</a>
  </li>
</ul>
content_copyCOPY