Page 1 of 1

not getting what the error is everythin looks perfect to me

Posted: Sat Mar 20, 2010 11:46 pm
by mayanktalwar1988

Code: Select all

foreach($routearr as $value)
    {
    if($value==(change here at kashmere gate ) || $value==(change here at rajiv chowk ) ||  $value==(change here at yamuna bank )   )
    {
    echo "<br>";
    echo "<div style=\"color:#8e0b0b\" > $value</div>";
    }
    else
    echo "<span style = \"color:#f80a0a\" >$value</span>";
    }
in above code line 3 gives this error Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\knowdelhi\metro\metrosubmit.php on line 2009
line 2009 in the error is line three here.when i comment out this piece of code everything works ok but when i remove the above code form comments the error again creeps in so error must be in above code..but it looks ok to me...

Re: not getting what the error is everythin looks perfect to me

Posted: Sun Mar 21, 2010 1:53 am
by Christopher
I am guessing that line should be something like:

Code: Select all

    if(($value=='change here at kashmere gate') || ($value=='change here at rajiv chowk') ||  ($value=='change here at yamuna bank')   )