fetch_assoc()) // { // $listd[] = $tiap; // } // $this->list = $listd; // } // function get_list() { // return $this->list; // } // } ?> prepare($query); $stmt->execute(); while ($tiap = $stmt->fetch(PDO::FETCH_ASSOC)) { $listd[] = $tiap; } $this->list = $listd; } catch (PDOException $e) { echo "Error: " . $e->getMessage(); } } function get_list() { return $this->list; } } ?>