Php 表中最后一个弹出的第一个索引号
我正在使用SB管理员引导 我的表没有正常工作(应该是用户可以搜索表中的数据,并且数据排列得很好),但是: 这是我的php代码:Php 表中最后一个弹出的第一个索引号,php,html,twitter-bootstrap,html-table,admin,Php,Html,Twitter Bootstrap,Html Table,Admin,我正在使用SB管理员引导 我的表没有正常工作(应该是用户可以搜索表中的数据,并且数据排列得很好),但是: 这是我的php代码: <div class="box-content"> <?php if ($result) { ?> <table class="table table-striped table-bordered bootstrap-datatable datatable"> &
<div class="box-content">
<?php
if ($result) {
?>
<table class="table table-striped table-bordered bootstrap-datatable datatable">
<thead>
<tr>
<th class="text-left">User ID</th>
<th class="text-left">Username</th>
<th class="text-left">Password</th>
<th class="text-left">Full Name</th>
<th class="text-left">Task</th>
</tr>
</thead>
<?php
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '
<tbody>
<tr>
<td class="center">' . $row['userid'] . '</td>
<td class="center">' . $row['username'] . '</td>
<td class="center">' . $row['password'] . '</td>
<td class="center">' . $row['fullname'] . '</td>
<td class="center">
<a class="btn btn-success" href="#">
<i class="halflings-icon white zoom-in"></i>
</a>
<a class="btn btn-info" href="#">
<i class="halflings-icon white edit"></i>
</a>
<a class="btn btn-danger" href="#">
<i class="halflings-icon white trash"></i>
</a>
</td>
</tr>
</tbody>';
}}
?>
</table>
</div>
用户ID
用户名
密码
全名
任务
从注释中删除的答案
您正在重复
元素,所以脚本只是获取该标记的第一次出现,并执行一些函数,使以后的
保持不变
移出循环,它在表中必须是唯一的