I have a basic tab menu that is minimally customized depending on what page is viewed e.g. Page A is viewed so the Page A menu tab has a white background. All other tabs have a tan background. I’m trying to do this with a header.php, page.php, and a .css. So if the Title of the page.php is the same as one of the tabs then that tab should have a white background.
My code doesn’t work because I can’t push the $mainNav variable on the page.php back to the header.php. Not sure that’s even possible or maybe I’m just doing this a completely silly way. Little help. Thanks.
Header.php:
[php]<?php
$menu[0] = “A”;
$menu[1] = “B”;
$arrlength = count($menu);
?>
!!!
[/php]
Page.php:
[php]<?php
$title = “Home”;
$arrlength = count($menu);
include “header.php”;
?>
"; } else { $mainNav = "mainNav"; echo "else " . $mainNav . $title . $menu[$x] ."
"; } } ?> <?php include "footer.php"; ?>
[/php]