Search
 
SCRIPT & CODE EXAMPLE
 

PHP

title active php

//index.php or controller

$pages = array();
$pages["offnungszeiten.php"] = "Öffnungszeiten";
$pages["sauna.php"] = "Sauna";
$pages["frauensauna.php"] = "Frauensauna";
$pages["custom.php"] = "Beauty Lounge";
$pages["feiertage.php"] = "Feiertage";

$activePage = "offnungszeiten.php";


//menu.php
<?php foreach($pages as $url=>$title):?>
  <li>
       <a <?php if($url === $activePage):?>class="active"<?php endif;?> href="<?php echo $url;?>">
         <?php echo $title;?>
      </a>
  </li>

<?php endforeach;?>
Comment

PREVIOUS NEXT
Code Example
Php :: image upload in cake 2 
Php :: show only fatal errors php 
Php :: in php einen div 
Php :: laravel eloquent order by relationship 
Php :: tina4 add debugging 
Php :: PHP Installation broken - shows strange php code as response 
Php :: laravel make request 
Php :: laravel localrole per many to many 3 foreign 
Php :: how to pass javascript variable to php 
Php :: Comment supprimer le fil d’Ariane WooCommerce dans WordPress 
Php :: Laravel - foreach on collection 
Php :: php send POST request same folder 
Php :: check if valid date format entered inside the excel import php 
Php :: laravel How to apply Eloquent where() to child in hasMany() relationship 
Php :: laravel passport login with username 
Php :: get array first element key php 
Php :: php print array as string 
Php :: how to add in massive php 
Php :: yii1 anchor tag 
Php :: child data retrive without timestamp laravel 
Php :: Extract all audio tracks / streams 
Php :: symfony check:requirements Fatal error: Using $this when not in object context in C:UsersAdmin.symfonycachecheck.php on line 778 exit status 255 
Php :: country 
Php :: php mysql row to json 
Php :: must return a relationship instance laravel 
Php :: enable cors cakephp 
Php :: create a product stripe 
Php :: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.3.27 Server at localhost Port 80 
Java :: convert string to localdatetime 
Java :: how to clear terminal in java 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =