Trying to get my PHP navigation bar to work. I am trying to echo the page where the user is on with the attached class of active if the page is current.
Here is my code
Do like this :
$pages = array(
"index.php" => "Home",
"pages/contact.php" => "Contact Us",
"pages/services.php" => "services",
"pages/employees.php" => "Employees",
"pages/dashboard.php" => "Dashboard");
foreach ($pages as $url => $label) {
echo '- ', "$label", '
';
}
?>