i have this code, and the output is: {"round (avg (salary), 0)":"1750"}
function tableOne() {
$query = mysql_query("select round (avg (salary), 0) from worker, formation_area where id_formation_area=1") or die(mysql_error());
$row = mysql_fetch_assoc($query);
$result = $row;
echo json_encode($result);
}
tableOne();
?>
but i need something like this: {1750}.
Any help?
print_r($result);so you can see the data you're working with.