Page 1 of 1

Keep Getting Parse Error: Parse Error

Posted: Sat Mar 06, 2010 12:13 am
by jsweazy
Hey everyone,

If you guys could help me that would be awesome. I have more code than this but this is where it is giving me the error:

Code: Select all

foreach ($menu_items as $item){
    if ($item['id'] == $id){
        menu .= "<li class='current'>"; //says error is on this line
    }else {
        menu .= "<li>";
    }
}
Thanks in advance for your help

Re: Keep Getting Parse Error: Parse Error

Posted: Sat Mar 06, 2010 12:32 am
by mikosiko
from the PHP manual
Basics

Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive

Re: Keep Getting Parse Error: Parse Error

Posted: Sat Mar 06, 2010 12:42 am
by jsweazy
oh thank you so much... i feel retarted. I stared at this code forever

Re: Keep Getting Parse Error: Parse Error

Posted: Sat Mar 06, 2010 12:44 am
by mikosiko
don't sweat... been there myself more than one time also :)