<div class="table-responsive"> <a href="admin.php?action=add" class="fa fa-pencil"> Add new</a> <table class="table table-striped table-bordered table-hover"> <thead> <tr> <th>#</th> <th>Full Name</th> <th>Username</th> <th>Role</th> <th>Action</th> </tr> </thead> <tbody> <?php $select_all = $db->selectAll($table); foreach ($select_all as $key => $rec) { echo "<tr><td>" . $rec["u_userid"] . "</td>"; echo "<td>" . $rec["u_name"] . "</td>"; echo "<td>" . $rec["u_username"] . "</td>"; echo "<td>" . $rec["u_rolecode"] . "</td>"; echo "<td> <a href='admin.php?action=edit&id=" . $rec["u_userid"] . "' class='fa fa-edit' alt='Edit current record'></a> | " . "<a href='admin.php?action=delete&id=" . $rec["u_userid"] . "' class='fa fa-times' alt='Delete current record'></a></td></tr>"; } ?> </tbody> </table> </div> <?php } }