I have two selects that return two arrays and I need to go through them in the same table, but the records are being duplicated. How can I best resolve this issue?
Follow the example:
<?php
foreach ($contratantes as $contratante) {
foreach ($contratados as $contratado) {
?>
<tr>
<td><?= $contratante['dataContratacao'] ?></td>
<td><?= $contratante['anuncioContratante'] ?></td>
<td><?= $contratante['tipoAnuncio'] ?></td>
<td><?= $contratado['anuncioContratado'] ?></td>
<td><?= $contratado['tipoAnuncioContratado'] ?></td>
<td><?= $contratado['login'] ?></td>
<td>Opções</td>
</tr>
<?php
}
}
?>