In my php:
$result = $conn->query("select address, lat, lang from user where phoneno = '" . $phoneno. "'");
$outp = "[";
while($rs = $result->fetch_array(MYSQLI_ASSOC)) {
if ($outp != "[") {$outp .= ",";}
$outp .= '"'  . $rs["address"] . '",';
$outp .= '' . $rs["lat"] . ',';
$outp .= ''   . $rs["lang"]        . '';
}
$outp .="]";
The value output from my php: ["Tampines Street 86, Singapore",1.3497658,103.9274115]
var locations = [
  ['Bondi Beach', -33.890542, 151.274856],
  ['Coogee Beach', -33.923036, 151.259052],
  ['Cronulla Beach', -34.028249, 151.157507],
  ['Manly Beach', -33.80010128657071, 151.28747820854187],
  ['Maroubra Beach', -33.950198, 151.259302]
];
The above is an example of how I want my php output value to be for my var locations. How can I do this?
 
    