db=$db; } public function afficherQuestions() { $i = 0; $query = 'SELECT * FROM Correct'; $query = $this->db->prepare($query); $result = $query->execute(); //$resultats = $this->db->query('SELECT found_rows()'); while($q = $result->fetchArray()){ $i= $i+1; $tabQuestions[] = new Question($i,$q['question'],$q['reponse']); } return $tabQuestions; } }