Hi I'm trying to plot multiple values and successfully done using this variable.
var locations = [
['Bacolod City', 10.64073 ,122.9689, 4],
['Bago City', 10.5333 ,122.8333, 5],
['Cadiz City', 10.950, 123.29, 3],
['Sipalay City', 9.7519, 122.40, 2],
['Kabankalan City', 9.896, 122.831, 1]
];
Now my next step is instead of static data like above, I would like to retrieve data from my mysql database and use it for var locations. Would appreciate any help on how to perform that. most i have seen is complicated and use json which i have no experience in. Thanks in advance.
Note:Btw I'm trying to plot using google maps api. sorry for not mentioning.
echo "var data = ".json_encode(data).";\n". That's not complicated.