Using PHP PDO I run this query
SELECT Name, Latitude, Longitude, Begin, End FROM VenueData
And fetch the data
$data = $sth->fetchAll();
Then output
header("Content-type: application/json");
print(json_encode(array('venues'=>$data)));
However the output is strange,
{"venues":[{"Name":"Flintstone1","0":"Flintstone1","Latitude":"57","1":"57","Longitude":"-124","2":"-124","Begin":"8","3":"8","End":"14","4":"14"}]}
It seems for every column in the select query there are 2 keys, one by name and one by index 0-n) in the json. I have not encountered this before, why is this happening?