query($sql); $data = $result->fetchAll(PDO::FETCH_ASSOC); echo json_encode($data, JSON_UNESCAPED_UNICODE); } }