954,180 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

not getting what the error is everythin looks perfect to me

foreach($routearr as $value)
       {
       if($value==(change here at kashmere gate ) || $value==(change here at rajiv chowk ) ||  $value==(change here at yamuna bank )   )
       {
      echo "";
      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...

mayanktalwar
Newbie Poster
16 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
 
if($value==(change here at kashmere gate ) || $value==(change here at rajiv chowk ) ||  $value==(change here at yamuna bank )   )


Is that your exact code? If it is, what does "change here at kashmere gate" mean? If it is supposed to be a string, enclose it in quote marks.

darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200
 

thanks yes the text (change here at......) is a string now its fine ....now i will keep this in mind

mayanktalwar
Newbie Poster
16 posts since Aug 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You