Re: [RESOLVED]Multiple IF's
i got an error on this line of code:
PHP Code:
}
elseif($admin == "daniel")
{
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in D:\main\index.php on line 22
i dont know what is wrong. if it helps i can post the whole code but it is 99 lines of code but most of it is html
Re: [RESOLVED]Multiple IF's
sorry i fixed it. the problem was that i was echoing a string and it was started with the " type thing and closed with the ' type thing. my brain is a bit slow today and i cant remember what they are called :rolleyes:
Re: [RESOLVED]Multiple IF's
double "quotes" single 'quotes'
Re: [RESOLVED]Multiple IF's
Re: [RESOLVED]Multiple IF's
Try to use single quotes rather than double quotes, unless you want embedded variables and/or escape sequences such as \n in the string.
Re: [RESOLVED]Multiple IF's
i normaly use single quotes because if you do something like
PHP Code:
echo "<img src="someimg.jpg">";
then it thinks the string ends at "src=" and then makes an error but if you did
PHP Code:
echo '<img src="someimg.jpg">';
then it would work fine.