title active php

Solutions on MaxInterview for title active php by the best coders in the world

showing results for - "title active php"
Valeria
25 Jul 2019
1//index.php or controller
2
3$pages = array();
4$pages["offnungszeiten.php"] = "Öffnungszeiten";
5$pages["sauna.php"] = "Sauna";
6$pages["frauensauna.php"] = "Frauensauna";
7$pages["custom.php"] = "Beauty Lounge";
8$pages["feiertage.php"] = "Feiertage";
9
10$activePage = "offnungszeiten.php";
11
12
13//menu.php
14<?php foreach($pages as $url=>$title):?>
15  <li>
16       <a <?php if($url === $activePage):?>class="active"<?php endif;?> href="<?php echo $url;?>">
17         <?php echo $title;?>
18      </a>
19  </li>
20
21<?php endforeach;?>
22
queries leading to this page
title active phptitle active php