我目前正在从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