<input type="submit" name="btnFiltro" value="Filtrar" class="btn btn-block btn-primary"> </form> <table class="table table-hover"> <tr> <td>Factura</td> <td>Proveedor</td> <td>Fecha</td> <td>Monto</td> <td>Vehiculo</td> <td>Tipo de Mantenimiento</td> </tr> <?php if (isset($_POST['btnFiltro'])) { $reporte = array(); $main = new Mantenimiento(); $reporte = $main->reporte($_POST['txtFecha1'], $_POST['txtFecha2']); $repVehiculo = new Vehiculo(); for ($x = 0; $x < count($reporte); $x++) { $tupla = array(); $tupla = $reporte[$x]; $repVehiculo->get($tupla[4]); ?> <tr> <td><?php echo $tupla[0]; ?> </td> <td><?php echo $tupla[1]; ?> </td>