0

我使用了红色字体,但在我的页面中它显示为绿色。

<?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>';
} 

?>
4

1 回答 1

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>';
} 

?>
于 2012-11-19T05:46:29.793 回答