语法错误PHP

时间:2015-12-14 19:30:24

标签: php

我有以下代码:

 <?php
 $con=mysqli_connect("host","user","pass","dbname");
    // Check connection
    if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }

    $result = mysqli_query($con,"SELECT * FROM Elevi");

    echo "<table border='1'>
    <tr>
    **<th class="right-middle h_user">Nume</th>,** 
    <th class="right-middle h_done">Teme facute</th>,
    <th class="right_middle h_check"><img src="img/h_check.png"></th>,
    <th class="right-middle h_undone">Teme nefacute</th>,
    <th class="right-middle h_uncheck"><img src="img/h_uncheck.png"></th>,
    </tr>";

    while($row = mysqli_fetch_array($result))
    {
    echo "<tr>";
    echo "<td class="right-middle user">" . $row['Nume'] . "</td>";
    echo "<td>" . $row['Teme facute'] . "</td>";
    echo "<td>" . "<img src="img/check.png">" ."</td>";
    echo "<td>" . $row['Teme nefacute'] . "</td>";
    echo "</tr>";
    }
    echo "</table>";

    mysqli_close($con);
    ?>

我收到的错误是我错过了&#39;,&#39;(逗号)或&#39 ;;&#39; (分号)就在它周围的星星线上。任何人都可以帮我纠正一下吗?如你所见,我尝试添加一个逗号,但我得到了同样的错误。

0 个答案:

没有答案