<?php for ($i = 0; $i < $lista->size(); $i++) { $var = $i + 1; echo "<li data-target=#carousel-example-generic2 data-slide-to=" . $var . "></li>"; } ?> </ol> <!-- Wrapper for slides --> <div class="carousel-inner"> <?php for ($i = 0; $i < $lista->size(); $i++) { $con = $lista->getListaAnuncio($i)->getContenido(); if ($i == 0) { ?> <div class= "item active" > <img src="imagenes/slider/Anuncio.png" alt="..." > <div class="carousel-caption" style="color: black;." > <h3>Anuncio</h3> <?php echo " <p>" . $con . "</p> "; ?> </div> </div> <?php } else {
<br/> </div> <section id="resultado" style="border: 0px solid blue;"> <div class='container '> <h1>Anuncios</h1> <br/> <br/> <table class="table table-striped"> <?php for ($i = 0; $i < $lista->size(); $i++) { $id = $lista->getListaAnuncio($i)->getId(); echo "<tr>"; echo "<td>" . $lista->getListaAnuncio($i)->getId() . "</td>"; echo "<td>" . $lista->getListaAnuncio($i)->getContenido() . "</td>"; echo " <td><button onclick='Eli({$id})' type='button' class='btn btn-outline btn-danger' style='margin-right: 20px;'>Eliminar</button></td>"; echo "</tr>"; } ?> </table> </div> </section> <footer style="width: 100%;height: 200px;background: gainsboro ;margin-top: 100px;" > </footer>