Re: Seems Simple enough
| From: | Stuart | Date: | Mon, 26 Jan 2004 16:39:46 +0000 |
| Subject: | Re: Seems Simple enough | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175776@lists.php.net to get a copy of this message | ||
Christopher J. Crane wrote:
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"; }Works fine here. The elseif condition will be true if $Balance is undefined. Are you sure that variable exists and is actually set to 10000? -- Stuart