Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get current page name for page active class

<?php
$url = basename($_SERVER['PHP_SELF']);
?>
//nav bar
<li  <?=  ($url === "dashboard.php") ? "class='active'"?>><a href='dashboard.php'> Dashboard</a></li>
<li <?= ($url === "bankdetails.php")? "class='active'"; ?>><a href="bankdetails.php"> Bank Account Details</a></li>
Comment

PREVIOUS NEXT
Code Example
Php :: beanstalk run laravel command 
Php :: Deutsch korrektur 
Php :: ’ php 
Php :: curl upload image huawei 
Php :: pagenavi plugin 
Php :: Random select value on array factory Laravel 
Php :: show real number and not exponential form php 
Php :: laravel select error 
Php :: cakephp 3 migrations foreign key 
Php :: html css js php 
Php :: HASHING in php double scripting 
Php :: wordpress profile queries 
Php :: Comment ajouter nofollow à un lien spécifique ou à tous les liens WordPress dans the_content 
Php :: what is livewire 
Php :: how to pass javascript variable to php 
Php :: laravel showing index of 
Php :: what returns livewire mount 
Php :: SymfonyComponentHttpKernelExceptionNotFoundHttpException: POST http://localhost/post 
Php :: Registering a variable with $_SESSION. 
Php :: laravel - How to concatenate URL and retrieve images from database in json format 
Php :: check website ssl certificate using php openssl_x509_parse 
Php :: how to store api response to avariable in phpp 
Php :: php delete acc 
Php :: verta sample jalali laravel problem return object 
Php :: php send to message to mobile number using springedge 
Php :: route laravel 
Php :: how to create a tryit editor 
Php :: upgrade php 5.6 to 7 centos 7 
Php :: php cheat sheet 
Php :: php simple server 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =