query("SELECT * FROM spbu"); if ($res) { while ($r = $res->fetch_assoc()) { $r['type'] = 'point'; $data[] = $r; } } echo json_encode($data); ?>