Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Query all the users and return the results
- $users = $db->query("SELECT * FROM users")->results(); ?>
- <!-- create a table -->
- <table class="table table-striped">
- <thead>
- <tr>
- <th>Name (using echouser function)</th>
- <th>First/Last Name</th>
- <th>Username</th>
- <th>Email</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach($users as $u){?>
- <!-- make a new row for each user -->
- <!-- the $u->fname us the $u from the foreach loop and the columname from the users table -->
- <tr>
- <td><?=echouser($u->id); //echouser function can be configured in the dashboard?></td>
- <td><?=$u->fname?> <?=$u->lname?></td>
- <td><?=$u->username?></td>
- <td><?=$u->email?></td>
- </tr>
- <?php }?>
- </tbody>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement