public function listRoteiro() { try { $roteiro = new ControllerRoteiro(); $query = $roteiro->listRoteiro(); return $query; } catch (Exception $ex) { echo $ex; } catch (Exception $ex) { } }
<tr> <th> ID </th> <th> Descrição </th> <th> Mercado </th> </tr> </thead> <tbody> <?php $bd = new ControllerRoteiro(); $lista = $bd->listRoteiro(); if (!empty($lista)) { while ($linha = $lista->fetch(PDO::FETCH_ASSOC)) { ?> <tr> <td><?php echo utf8_encode($linha['roteiro_id']); ?> </td> <td><?php echo utf8_encode($linha['nome_fantasia']); ?> </td> <td><?php echo utf8_encode($linha['descricao']); ?>