prepare($sql); $stmt->execute($params); echo json_encode($stmt->fetchAll());