效果图:
<table class="table table-striped table-bordered table-hover"> <thead> <tr> <th> <span class="uni"> <input type=‘checkbox‘ value=‘check1‘/> </span> </th> <th>头像</th> <th>姓名</th> <th>昵称</th> <th>电话</th> <th>性别</th> <th>操作</th> </tr> </thead> <tbody> <!-- 二维数组输出表格 --> <?php foreach($users as $key => $value){ ?> <tr> <td> <span class="uni"> <input type=‘checkbox‘ value=‘check1‘/> </span> </td> <td> <img src="../assets/img/user.jpg" /> </td> <td> <?php echo $value[‘name‘]; ?> </td> <td> <?php echo $value[‘nickname‘]; ?> </td> <td> <?php echo $value[‘mobile‘]; ?> </td> <td> <?php echo $value[‘sex‘]; ?> </td> <!-- 二维数组输出表格 结束 --> <td> <button class="btn btn-xs btn-default"><i class="icon-pencil"></i></button> <button class="btn btn-xs btn-danger"><i class="icon-remove"></i></button> </td> </tr> <?php } ?> </tbody> </table>
参考:
时间: 2024-11-07 03:04:37