Jump to content

[SOLVED] COLOR PHP


ronnie88

Recommended Posts

function get_topPilot() {

$p = new Pilot();
$p->getTop();

$rv = "<table>\n";
$rv .= "<tr><th>Pilot Name</th><th>VAdmin id</th><th>Total Hours</th></tr>";	
$rv .= "<tr><td>".$p->fullname."</td><td>".$p->vadminid."</td><td>".$p->totalhours."</td></tr>";
$rv .= "</table>";
return ($rv);

}

function get_totalPireps($id) {
$total = 0;
$p = new Pirep();
$p->getAll();
foreach ($p as $pirep) {
	if ($pirep['pilotid'] == $id) {
		$total++;
	}
}

return ($total);
}

the echo is on the homepage like this:

	
        <? echo get_homepagepireps(); ?>
<p class="content-title-noshade-size2"><font COLOR="#FFFFFF">Current top pilot</font></p>


<? echo get_topPilot(); ?>
       

I've tried just throwing a <font color..... and <HTML & <body codes before the <? echo usually works but didn't this time

 

I'm trying to change the output color of the text... of both  codes thanks

Link to comment
https://forums.phpfreaks.com/topic/105666-solved-color-php/
Share on other sites

nvm i got it just forgot my slashes in the font code


$p = new Pilot();
$p->getTop();

$rv = "<table>\n";
$rv .= "<tr><th><font color=\"#00FF00\">Pilot Name</font></th><th><font color=\"#00FF00\">VAdmin id</font></th><th><font color=\"#00FF00\">Total Hours</font></th></tr>";	
$rv .= "<tr><td><font color=\"#00FF00\">".$p->fullname."</font></td><td><font color=\"#00FF00\">".$p->vadminid."</font></td><td><font color=\"#00FF00\">".$p->totalhours."</font></td></tr>";
$rv .= "</table>";
return ($rv);

Link to comment
https://forums.phpfreaks.com/topic/105666-solved-color-php/#findComment-541470
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.