0
I’m having a problem with listing an array within a table, I’m using a function to capture information from a file. torrent and display in a table, however when files are inside a folder, the list keeps repeating the folder name.
How could I get around this problem.
<table>
<thead>
<tr>
<th scope='col'>ARQUIVOS</th>
<th scope='col'>TAMANHO</th>
</tr>
</thead>
<tbody>
<?php foreach($torrent->result['info']['files'] as $file) {
echo "
<tr>
<td class='announce-list-file'>" . implode('<tr><td>',$file['path']) . "</td>
<td class='announce-list-file'>" . formatSizeUnits($file['length']) . "</td>
</tr>";
}
?>
</tbody>
</table>
Thanks for answering, I tested but it did not work, it does not appear anything, the if is interpreting as false and is not displaying anything, from a look at my other question, I added the source at the end of the question, if you want to give a deeper look. https://answall.com/questions/352972/lista-pasta-e-subpastas-em-um-foreach-php
– Vitor Hugo