A Question Please Help
Posted: Thu Jul 08, 2004 2:19 am
I need help! I very new at php but have found some code that helps me build a subnav for my site. My problem is with the "About Us" section of my site. I know the PHP code works in that it directs the links it to its respective folder path inside the "About Us" page. Whats happening is that when you try to press the About Us link, which is indicated by au in the array, it takes you to the path "/about/au/index.php". What I need is it to be taken to the path "/about/index.php". Everything works perfect for the other links, such as:tp, ct, ot. Can someone please help me out making the About Us(a.k.a: au) link to "/about/index.php". Everything looks and functions correctly, even the About Us link looks perfect, but it doesn't link to the right place. Please keep in mind, I can't change actual paths(folders) in the "About" section of the site.
PLEASE HELP!
PLEASE HELP!
Code: Select all
<?php
$arrSNav = array('au','tp','ct','ot');
foreach($arrSNav as $snav) {
$dispSNav .= "<a href="/about/" . $snav . "/index.php"";
if($cap == $snav) {
$dispSNav .= "><img src="/about/images/snav_" . $snav . "_on.gif" alt="" . $snav . "" border="0" width="159" height="25">";
}
else {
$dispSNav .= "onMouseOver="snavover('" . $snav . "');return true;" onMouseOut="snavout('" . $snav . "');return true;"><img name="" . $snav . "" src="/about/images/snav_" . $snav . ".gif" alt="" . $nav . "" border="0" width="159" height="25"";
}
$dispSNav .= "</a><br>\n";
if($snav != 'ot') {
$dispSNav .= "<img src="/about/images/snav_divider.gif" width="159" height="1" border="0">";
}
}
print $dispSNav;
?>