如何在旧脚本的Echo php中添加字体?

时间:2018-10-20 08:48:05

标签: php

请输入旧代码,并需要使用Google字体或其他字体设置其格式, 我试过一些陈述但没有用, 请帮忙!

--------------代码--------------

<?php header("Content-type: text/html; charset=utf-8");?>
<?php
include "inc/config.inc.php";
?>
<table width="100%" dir="rtl">

<?php
					$query = "SELECT person_id, name, DATE_FORMAT(updated, ".$datefmt.") AS ddate, suffix FROM ".$tblprefix."people";
					if ($_SESSION["id"] == 0)
						$query .= " WHERE date_of_birth < '".$restrictdate."'";
					$query .= " ORDER BY updated DESC LIMIT 0,5";
					$result = mysql_query($query) or die($err_changed);
					$i = 0;
					while ($row = mysql_fetch_array($result)) {
						if ($i == 0 || fmod($i, 2) == 0)
							$class = "tbl_odd";
						else
							$class = "tbl_even";
?>
					<tr>
						<td class="<?php echo $class; ?>" align="right"><li><a target="_blank" href="people.php?person=<?php echo '<style = "font-color: #ff0000"> $row["person_id"]; ?>"><?php echo $row["name"]." ".$row["suffix"]; ?></a></td>
						
<!-- <td class="<?php echo $class; ?>"><?php echo $row["ddate"]; ?></td> -->
					</tr>
<?php
						$i++;
					}
					mysql_free_result($result);

?>
				</table>

1 个答案:

答案 0 :(得分:0)

如果只想对奇数行和偶数行使用替代样式,则可以使用纯CSS的:odd或:even选择器来实现。