$stmt = $pdo->prepare("SELECT * FROM table WHERE id = ?"); $stmt->execute([$id]); $result = $stmt->fetchAll();