Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (count($hasil)>0) { ?>
- <table id="example1" class="table table-bordered table-striped">
- <thead>
- <tr>
- <th>No</th>
- <th>Id User</th>
- <th>Username</th>
- <th>Nama</th>
- <th>Opsi</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $i = 1;
- foreach ($hasil as $key => $list) { ?>
- <tr>
- <td><?php echo $i;?></td>
- <td><?php echo $list['id_user'];?></td>
- <td><?php echo $list['username'];?></td>
- <td><?php echo $list['nama'];?></td>
- <td><a href="<?=base_url();?>admin/user/edit/<?php echo $list['id_user'];?>">Edit</a> | <a href="<?=base_url();?>admin/user/delete/<?php echo $list['id_user'];?>">Hapus</a></td>
- </tr>
- <?php $i++; }?>
- </tbody>
- </table>
- <?php }else{
- echo "Data Tidak Tersedia!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement