I need to get an array generated from a script php. I have Latitude and Longitude for each user in a database. I take the values from the db with this code (file.php):
use this
echo json_encode($array);
on server side
and
var arr=JSON.parse(result);
on client side