function displayNews($bd, $offset) { $tth = new TouiteHandler($bd); $th = new touitosHandler($bd); $touiteList = $tth->gettouitesOfWhoIFollow($_SESSION['id'], $offset * 10); foreach ($touiteList as $key => $touite) { $tr = new TouiteRender($_SESSION['id'], $bd); $auteur = $th->getByAttr("id", $touite->getIdAuteur(), PDO::PARAM_STR); $tr->render($touite, $auteur); } if (empty($touiteList)) { return false; } return true; }