View Single Post
Old 12-06-2012, 08:56 AM   PM User | #3
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,667
Thanks: 46
Thanked 456 Times in 444 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
As LC says, you need to put the code inside the { and } braces. This is your code:
Code:
            if ((curPageName() == $url) && (curPageName() !== $index)) {
                $class='current';
            }
            echo "<li><a href='$url' class='$class'>$name</a></li>";
            elseif (curPageName() == $index) {
                $class='current home';
            }
That bold red line cannot be there. It must be either completely outside the if/elseif or inside one of the brace sets.
__________________
Please don't be rude: Put your php code in [php][/php] tags. It is a sticky topic at the top of the forum and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote