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

Recommended Answers

All 2 Replies

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.