Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 表中最后一个弹出的第一个索引号_Php_Html_Twitter Bootstrap_Html Table_Admin - Fatal编程技术网

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"> &

我正在使用SB管理员引导

我的表没有正常工作(应该是用户可以搜索表中的数据,并且数据排列得很好),但是:

这是我的php代码:

<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
用户名
密码
全名
任务
从注释中删除的答案

您正在重复
元素,所以脚本只是获取该标记的第一次出现,并执行一些函数,使以后的
保持不变

移出循环,它在表中必须是唯一的