PHP
PHP

Reputation: 443

Font Color Issue While Using in Mysql commands

I used the font color red, but in my page it showing green color.

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

?>

Upvotes: 0

Views: 146

Answers (1)

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

?>

Upvotes: 2

Related Questions