co = $co; } public function findByName($name) { $query = "SELECT * FROM Artiste WHERE nom = :nom"; $this -> co -> executeQuery($query, array('nom' => array($name, PDO::PARAM_STR))); $res = $this -> co -> getResults(); foreach ($res as $row) { $tab[] = new Artiste( $row['id'], $row['nom'], $row['prenom'], $row['nb'], ); } return $tab; } } foreach ($listNews as $news) { }