here is my code. it only retrieve last inputted data.
How can i populate all data in a htnl table.
<html>
<?php
$id =new Register();
$test=Register::selecthey();
foreach($test as $t=>$sid){
}
?>
<table>
<thead>
<tr>
<th>Document ID</th>
<th>Personnel ID</th>
<th>Docs Name</th>
<th>Docs Num</th>
<th>Docs Date</th>
<th>FileName</th>
<th>Data</th>
</tr>
</thead>
<tbody>
<tr>
<td><?= $sid->gov_docs_id ?></td>
<td><?= $sid->personnel_id ?></td>
<td><?= $sid->docs_name ?></td>
<td><?= $sid->docs_num ?></td>
<td><?= $sid->docs_date ?></td>
<td><?= $sid->filename?></td>
<td><button type="button" onclick="javascript:location.href='/getfile/<?= $sid->gov_docs_id?>'">download</button></td>
</td>
</tr>
<?}?>
</tbody>
<tfoot>
<tr>
<td></td>
</tr>
</tfoot>
</table>
</body>
</html>