Well, I was using JQuery for Ajax Post request and getting the data back.
Ajax is working fine, but:
coordinates = [];
$.post("ajax_markers.php",{time:time},function(result) { coordinates=result.split(','); alert(coordinates); }); // Alerts the Coordinates as Expected :)
But..
$.post("ajax_markers.php",{time:time},function(result) { coordinates=result.split(','); });
alert(coordinates); // Alerts with a Blank Box :(
Why is this happening ?
Both should alert with same data.. as coordinates is global to both!