I've got a MySql table I'm running a query on
<?php
// Make a MySQL Connection
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("GPS") or die(mysql_error());
// Get all the data from the "example" table
$myquery = "SELECT * FROM GPSCoords";
$query = mysql_query($myquery) or die(mysql_error());
$data = array();
for ($x =0; $x < mysql_num_rows($query); $x++){
$data[] = mysql_fetch_assoc($query);
}
echo json_encode($data);
?>
The json returned is as such:
[
{
"Row": "01SS",
"Number": "1E",
"Latitude": "33.39064308000000",
"Longitude": "-121.918467900",
"LatLong": "[33.39064308000000,-121.918467900]"
}
]
How would I go about getting the LatLong value as unquoted?
i.e.
[
{
"Row": "01SS",
"Number": "1E",
"Latitude": "33.39064308000000",
"Longitude": "-121.918467900",
"LatLong": [
33.39064308000000,
-121.918467900
]
}
]