View Full Version : Change text color

10-30-2012, 08:54 AM
Hi all,

I am not new to PHP but i get my way even if it takes time :)

I am busy with a project where i call a DOUBLE value from a mysql database every 5sec.

I need to check if the value is above 0 or below 0.

If the value is above 0, the font color should be BLUE and if below 0, the font color must be red.

I will post my next issue when this one is resolved.

I appreciate any help!


10-30-2012, 01:56 PM
That can be solved using PHP if else statements. Why don't you post the code you have come up with so far here so that we can help you.

10-30-2012, 02:10 PM
Could you please send me the code? So only we can move further which is next step.

10-30-2012, 04:51 PM
It would be something like this,

if (value==0) {
echo "<font color="blue">0</font>";
else {
echo "<font color="red">1</font>";

i'm not to good with php but i would think it would be something like that.