I have a problem with my while loop, every item needs to have a comma, but the last one doesn't need one, but i don't know what i need to do...
while($row = $result->fetch_assoc()) {
echo "
{
id: " . $row['id'] . ",
dexNr: " . $row['mon_id'] . ",
name: '" . $row['mon_id'] . "',
expiration: " . $row['expire_timestamp'] . ",
lat: " . $row['lat'] . ",
lng: " . $row['lon'] . "
},
";
}