Using colour for text in a php script

I have a part of a script and i want the text online to be in green, and offline in red.

echo "online"; } else { echo "offline";

Im not sure how to change them because im new to php.

Tom Bullock

PHP doesn’t handle the presentation of your webpage, HTML is responsible for that. It is perfectly okay to echo HTML code:

   echo "<span style="font-color: #00FF00;">online</span>";
   echo "<span style="font-color: #FF0000;">offline</span>";
Sponsor our Newsletter | Privacy Policy | Terms of Service