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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.