I want to add an ID to a span element if the page is either 'a' or 'b'.
My code so far is this:
<span class="subnav2" <? if(($page == 'a') || ($page == 'b')): ?> id="active"<? endif ?>>
but it only adds the class to the span when 'a' is true. What am I doing wrong?
The value of $page is:
<?
$path = basename($_SERVER['PHP_SELF']);
$page = basename($path);
$page = basename($path, '.php');
$page = str_replace('_',' ',$page);
$page = str_replace('.php','',$page);
$page = ucfirst($page);
?>