<div class="row"> <div class="col-lg-1"></div> <div class="col-lg-7"> <div class="page-header"> <h4>Documentos recientes</h4> </div> <table class="table table-hover"> <tr> <th>No</th> <th>Nombre</th> <th>Ranking</th> <th>Usuario</th> </tr> <?php $book = new book(); $lista = $book->new_entries_by_category(3); $elemento = new element_book(0, 0, "", ""); $x = 0; while ($x < count($lista)) { $elemento = $lista[$x]; echo '<tr><th>' . ($x + 1) . '</th><td><a href="fileprofile.php?id=' . $elemento->getId() . '">' . $elemento->getTitle() . '</a></td><td>'; $estrellas = round($elemento->getPunteo()); $blancas = 5 - $estrellas; $y = $blancas; while ($y < 5) { ?> <span class="glyphicon glyphicon-star"></span><?php $y++; } $y = 0; while ($y < $blancas) {