Re: Wanting to better understand
| From: | Chuck PUP Payne | Date: | Wed, 02 Oct 2002 03:12:03 +0000 |
| Subject: | Re: Wanting to better understand | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118512@lists.php.net to get a copy of this message | ||
Ahhhh, ok. You know am still having problems with elseif, else, Ok, thanks I
will give it a try.
Chuck
On 10/1/02 11:03 PM, "Chris Shiflett" <shiflett@php.net> wrote:
> 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.
>>
>