<?php require_once 'head.php'; echo ' <h1>Tabela de Alunos IncluĂdos</h1> <table class="table table-striped"> <tr> <th>NOME</th> <th>NOTA</th> </tr>'; require_once 'conexao.php'; require_once 'Model.php'; $aluno = new Model($conexao); foreach ($aluno->listagem() as $detalhe) { echo '<tr>'; echo '<td>' . $detalhe['nome'] . '</td>'; echo '<td>' . $detalhe['nota'] . '</td>'; echo '</tr>'; } ?> </table> <?php $primeiro = 0; $segundo = 0; $terceiro = 0; $primeironome = null; $segundonome = null; $terceironome = null; $maiornota = new ArrayIterator($aluno->listagem());
<?php require_once 'head.php'; require_once 'conexao.php'; require_once 'Model.php'; $listar = $_GET['listar']; $aluno = new Model($conexao); if (isset($listar) && $listar == 's') { echo "<table class='table'>\n <th>NOME</th>\n <th>NOTA</th>"; foreach ($aluno->listagem() as $detalhe) { echo '<tr>'; echo '<td><a href="busca.php?nome=' . $detalhe['nome'] . '">' . $detalhe['nome'] . '</a></td>'; echo '<td>' . $detalhe['nota'] . '</td>'; echo '</tr>'; } }