I wrote a script to indicate the active page by changing the element class.
But it's not working, need some help. Here is the script:
- Code: Select all
<?php $menuItems = array('home', 'create','projects','forums', 'connections','settings','login','donate');
for($i=0; $i< count($menuItems); $i++){
if($_SERVER['PHP_SELF'] == $menuItems[$i].".php"){
$active = "navBlockActive";
}else{
$active = "navBlock";
}
echo '<a href="'.$menuItems[$i].'.php">
<div class="'.$active.'">';
echo '<p>'.$menuItems[$i] . '</span>';
echo '</div></a>';
} ?>
Thanks in Advance,
Mike

