Hi There,
I'm trying to create a menu using PHP and CSS.
This is what I currently have:
<?php
//we need to set a var to find what page we are on
$pageOn = basename($_SERVER['PHP_SELF']);
//this is used for the title bar
$mItem = $pageOn;
?>
<a href="index.php" <?php if($pageOn == 'index.php'){?> class="selected"<?php } else {?> class="normal"<?php }?> id="menu1">Home</a>
<a href="about_york_office_furniture.php" <?php if($pageOn == 'aboutus.php'){?> class="selected"<?php } else {?> class="normal"<?php }?> id="menu2">About Us</a>
This works great but I want to add another argument but not sure where it needs to go. I want to say
"If the page is aboutus.php or meettheteam.php then class="selected" else class="normal" "
So, in short I want to add an 'or' argument. How would I do this?
Thanks in advance!


Reply With Quote
Bookmarks