我目前正在從mySQL中獲取表格的項目,這些表格顯示在html表格中。下面你可以看到代碼。將自定義字體應用於PHP中的表格單元格echo
if (mysql_num_rows($result) > 0) {
// yes
// print them one after another
echo "<table cellpadding=1 border=1 width=100%>";
while($row = mysql_fetch_row($result)) {
echo "<tr>";
echo "<td>"."<center>".$row[0]."</center>"."</td>";
echo "<td>" .$row[2]."</td>";
echo "<td>" .$row[1]."</td>";
echo "<td>" .$row[3]."</td>";
echo "</tr>";
}
echo "</table>";
}
我需要將其更改爲
if (mysql_num_rows($result) > 0) {
// yes
// print them one after another
echo "<table cellpadding=1 border=1 width=100%>";
while($row = mysql_fetch_row($result)) {
echo "<tr>";
echo "<td>"."<center>".$row[0]."</center>"."</td>";
echo "<td>" .$row[2]."</td>";
echo "<td>" .$row[1]."</td>";
echo "<td><font face="Georgia, Times New Roman, Times, serif">" .$row[3]."</font></td>";
echo "</tr>";
}
echo "</table>";
}
當我這樣做是拋出回的錯誤。我這樣做,所以用戶看到我有一個字體的條形碼。
我做錯了嗎?還是有另一種更好的方法。
感謝 瑞安
最新錯誤,你可以在這裏發佈? –
請編輯您的問題,以包括錯誤 – RedEyedMonster