prepare("SELECT People_ID, People_name, People_licence FROM People"); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); echo json_encode(array("message" => "ok", "owners" => $result)); }