Re: Wanting to better understand

From: Date: Wed, 02 Oct 2002 03:03:48 +0000
Subject: Re: Wanting to better understand
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-118510@lists.php.net to get a copy of this message
Chuck, I'm not sure what you're trying to do, but I think you might just want to order it the other way around. if ($days > "45") {
    # $days is 46 or more
    do stuff
} elseif ($days > "30") {
    # $days is 31-45
    do other stuff;
} else {
    # $days is 30 or less
    more stuff;
} Also, be careful about overwriting $days with that long string and then trying to compare it to a numeric value. You probably want to use a different variable name for the string. Happy hacking. Chris Chuck \"PUP\" Payne wrote:
If ($days > "30") { $days "<strong><font color='ff0000'>" . $days . "</font></strong>"; } Want I want to do was add a second line this below to change the another value to change to change to another color... If ($days > "45") { $days "<strong><font color='ff00ff'>" . $days . "</font></strong>"; } But, the second value is over riding the first vaule so I can't see the differents.


« previous php.general (#118510) next »