Sorry. Ok, I have a navigation bar with drop down menus. The main navigation bars each have a current class associated with them. What I want to do, Is have each page in the drop down under the main navigation, apply the current class to its associated main navigation item. So Under the services main nav item, there are pages 1, 2, 3, and 4; and under the products main nav item, there are pages 4, 5, 6. I need code for the header file, so that whenever you are on page 1, 2 3, or 4, the current class applies to the services main item nav, and whenever you are on pages 4, 5, or 6, it applies to the product main item nav.
The following code applies the current class to the services item nav, when you are on carpetcleaning.php, for example.
Code: Select all
<li><a <?php if ($page == 'carpetcleaning.php') { ?> class="current" <? php } ?> href="services.php">services</a></li>
What I need is to be able to apply this to multiple pages, so I thought I could use 'or' do do this, but this does not work and applies the current class no matter what page you are on.
Code: Select all
<li><a <?php if ($page == 'carpetcleaning.php' or 'windowcleaning.php') { ?> class="current" <? php } ?> href="services.php">services</a></li>
Thanks,
Matt