I try to add a row of mysql query into JSON whit php. I use this code:
public function lugaresCercanos($lng, $lat, $distance){
$result=mysql_query(\"SELECT n
Thanks, I resolve it.
$info=array();
while($row = mysql_fetch_array($result,MYSQL_ASSOC)){
array_push($info,$row);
}
$info;
$result_final->lugares_cercanos = $info;
Print this:
{"logstatus":"1","lugares_cercanos":[{"nombre":"Rio Amazonas","distancia":"5119.000"}{"nombre":"Swissotel Quito","distancia":"5823.000"}{"nombre":"Laguna de Yaguarcocha","distancia":"71797.000"}]}