So I have a php which gets set of coordinates from the database , I want it to run through a jquery variable. This is the PHP -
$sql = "SQL that works";
$vari = mysqli_query($con,$sql);
while($row = mysqli_fetch_array($loc))
{echo "[";
echo "''";
echo $row['cor1'];
echo ",";
echo $row['cor2'];
echo "]";
}
This is the jquery that I want it to pass through in this form -
var markers = [
['', 51.503454,-0.119562],
['', 51.499633,-0.124755]
];
json_encode()what you get back to work with the result set in jQuery?