0
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...

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by mayanktalwar
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.

0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.