So I try to retrieve all data from user table and put it on Array.
This is the Array output :
Array ( [error] => false
[users] => Array (
[0] => Array (
[user_id] => 34
[name] => test1
[status] => actived )
[1] => Array (
[user_id] => 35
[name] => test2
[status] => actived )
)
)
And this my table code in HTML :
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Code</th>
<th>Company</th>
<th class="numeric">ID</th>
<th class="numeric">Name</th>
<th class="numeric">Status</th>
</tr>
</thead>
<tbody>
<tr>
<td class="numeric"><?php ID VALUE HERE ?></td>
<td class="numeric"><?php NAME VALUE HERE ?></td>
<td class="numeric"><?php STATUS VALUE HERE ?></td>
</tr>
</tbody>
</table>
I already try foreach like this :
foreach ($error as $key => $val) {
}
and put the print_r ($val[0]['name']); into the NAME VALUE.
but it just make the table is worst.
How to put each array value into that table ?
What is the best way to do that ? Thanks :)