I have these lines of code, that I thought was simple enough, but it doesn't
work how I thought.
The Variable $Balance is set to 10000 in the database, and I thought it
would be outputed as purple or the be found true of the "else" part of the
code. It comes out as red or the "elseif" part of the code.

 if($Balance >= 10001) { echo "<font
color=\"green\">\$$Balance</font><br>\n"; }
 elseif($Balance <= 9999) { echo "<font
color=\"red\">\$$Balance</font><br>\n"; }
 else { echo "<font color=\"purple\">\$$Balance</font><br>\n"; }

I originally had it as follows, but that didn't work either.

 if($Balance > 10000) { echo "<font
color=\"green\">\$$Balance</font><br>\n"; }
 elseif($Balance < 10000) { echo "<font
color=\"red\">\$$Balance</font><br>\n"; }
 else { echo "<font color=\"purple\">\$$Balance</font><br>\n"; }

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to