Hi, I’m trying to use data from my database to plot points on a google map. I’m using php to connect to the database and then echo the code including the relevant long and lat information and also the name and description for each record that matches the city specified.
I am getting the following error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘,’ or ‘;’ in /- on line 174
Here is the section of code that is apparently causing the issue:
<?php while($row = mysql_fetch_array($result)){ echo "var point = new GLatLng(".$row['lat']", ".$row['lng']");"; echo "var marker = createMarker(point, \"".$row['name']"\" , \"".$row['description']"
\")" echo "map.addOverlay(marker);"; } ?>Any help appreciated.