PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am having trouble with this error, i don't know how to fix it. here is the full error:
Parse error: syntax error, unexpected T_IF in /home/wesley/public_html/forums/header.php on line 15
I am quite new to php so i dunno if this is correct. Help would be much apreciated.
here is the code from the begining:
now the first if statement works on the index part of the list becasue it has the php around it, but i need to know how to put this into the echo tag. cheers
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Thankyou for the fast reply, yes this has sort of sovled my problem i no longer get an error, but i would like the if statement to work so that if the current page name is false then the class is not included or has just disapeared. So like i have the site tab but i only want the current page to have the 'current' class. I dunno how to do this as i have never come accross that way of using an if function before. cheers
I´m not sure I´m getting you... the if statement is working as you write it, but with a different shorter-sintaxis... did you try it when it´s true or false and didn´t work?