$telefonosLimpiarValidados = mostrarTelefonosFinal($cartera, $fecha,
$empresa, $connection); ?>
<div class="table-responsive" id="data-tabla-html">
<table class="table table-striped table-bordered"
cellspacing="0" width="100%" id="example">
<thead>
<tr>
<th>id_local</th>
<th>documento</th>
<th>telefono</th>
<th>telefono1</th>
</tr>
</thead>
<tbody>
<?php if (is_object($telefonosLimpiarValidados)) {
if (isset($_SESSION["accionTabla"]) &&
$_SESSION["accionTabla"] === 'final') {
$lastUser = "";
$lastCell = "";
while ($recorroTelefonos =
mysqli_fetch_assoc($telefonosLimpiarValidados)) {
$largo = strlen($recorroTelefonos["telefono"]);
if ($largo === 10 || $largo === 12) {
if ($recorroTelefonos["sin_15"] !== '0') {
$user = $recorroTelefonos["id_local"];
if ($user != $lastUser) { ?>
<tr>
<!-- Muestro datos -->
<td> <?php echo $recorroTelefonos["id_local"]; ?></td>
<td> <?php echo $recorroTelefonos["documento"]; ?></td>
<td> <?php echo $recorroTelefonos["documento"];$recorroTelefonos["telefono"]; ?></td>
<td> <?php echo $recorroTelefonos["telefono"]; ?></td>
<?php } else {
$cell = $recorroTelefonos["telefono"];
$cell = $recorroTelefonos["telefono"];
if ($cell != $lastCell) { ?>
<td> <?php echo $recorroTelefonos["telefono"]; ?></td>
<?php } else {
}
?>
//nada </tr>
}
?>
</tr>
<?php }
$lastUser = $user;
$lastCell = isset($cell) ? $cell : '';
}
}
}
}
}
</tbody>
</table>
</div>