if then else and font color
Posted: Mon Sep 22, 2003 2:24 pm
I have a statement that compares two numbers. I would like to have the "then" portion displayed in red if $number1 is not equal to $number. I have tried several differnt things, but can not make it work. I keep getting a parse error. I am new to php so any help with a good explaination would be appreciated.
Thanks
Code: Select all
<?php if ($number1 <> $number){echo money_format('%(#10n', $number1)."\n";} else {echo money_format('%(#10n', $number1)."\n";}
?>