...

View Full Version : Change text color



janniekotze
10-30-2012, 07: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!

Jannie

Redcoder
10-30-2012, 12: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.

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

bigcasey123
10-30-2012, 03: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum