Skip to content

Instantly share code, notes, and snippets.

@jlamim
Last active June 20, 2016 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlamim/2f35f36d09c7d6d921397ccbd33771f7 to your computer and use it in GitHub Desktop.
Save jlamim/2f35f36d09c7d6d921397ccbd33771f7 to your computer and use it in GitHub Desktop.
Paginação de resultados com Ajax, CodeIgniter e Bootstrap - Conteúdo HTML retornado via ajax
<?php if($usuarios): ?>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<th>#</th>
<th>Nome</th>
<th>Email</th>
</thead>
<tbody>
<?php foreach($usuarios as $usuario): ?>
<tr>
<td><?=$usuario->id?></td>
<td><?=$usuario->nome?></td>
<td><?=$usuario->email?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php echo $pagination; ?>
<?php else: ?>
<p class="alert alert-info">Página inexistente</p>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment