我使用红色字体颜色,但在我的页面中显示绿色。
<?php
include('connect-db.php');
$result = mysql_query("SELECT * FROM players") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo '<font color=\"red\">';
echo $row['firstname'] ;
echo '</font>';
echo ':';
echo $row['lastname'] ;
echo '<br><br>';
}
?>
答案 0 :(得分:2)
<?php
include('connect-db.php');
$result = mysql_query("SELECT * FROM players") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo '<span style=\"color:red;\">';
echo $row['firstname'] ;
echo '</span>';
echo ':';
echo $row['lastname'] ;
echo '<br><br>';
}
?>