这样写能输出
echo "<table border='1'>
<tr>
<th>id</th>
<th>标题</th>
<th>内容</th>
<th>日期</th>
<th>编辑</th>
<th>删除</th>
</tr>";
while($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>" .$row['id']. "</td>";
echo "<td>" . $row['title'] . "</td>";
echo "<td>" . $row['contents'] . "</td>";
echo "<td>" . $row['dates'] . "</td>";
echo "<td>" .编辑 . "</td>";
echo "<td>" .删除. "</td>";
echo "</tr>";
}
echo "</table>";
但是按照下面这样写就无法输出,请教懂的这是为什么。网上好多视频都是下面这种写法
echo "<table border='1'>
<tr>
<th>id</th>
<th>标题</th>
<th>内容</th>
<th>日期</th>
<th>编辑</th>
<th>删除</th>
</tr>";
while($row = mysql_fetch_assoc($result))
{
echo "<tr>";
echo "<td>($row['id'])</td>";
echo "<td>($row['title'])</td>";
echo "<td>($row['contents'])</td>";
echo "<td>($row['dates'])</td>";
echo "<td>编辑 </td>";
echo "<td>删除</td>";
echo "</tr>";
}
echo "</table>";
另外还有个问题,我想在编辑和删除位置挂超链接del.php文件和编辑文件,该怎么写代码
ç¼è¾é¾æ¥ä¸å é¤ç±»ä¼¼ã