I made a mysql query in php as given below
$Q = "SELECT length, width FROM statxyx WHERE siteid='$siteid'";
$R = mysqli_query($DB,$Q);
//start loop
//while or foreach
while($row = mysqli_fetch_assoc($R)){
echo "['7C6Buh',{$row['length']},{$row['width']}],\r\n";
}
The output is like
['7C6Buh',37.4192,-122.0574],
['7C6Buh',34.147,-118.1392],
['7C6Buh',23.7231,90.4086],
['7C6Buh',39.9543,-75.1657],
['7C6Buh',32.7787,-96.8217],
['7C6Buh',37.4192,-122.0574],
But i want to have last row without comma. How to do this. Thanks in advance.