Posted by Lee David on 05/27/05 00:21
Let's say $myrow[status] = "n". The if statement is true because it is not
"u". Let's say it is "u". The if statement is true because it is not "n".
Let's say it is "x". The if statement is true because it is not "n".
I would do it this way :
$status = strtolower($myrow[status])
if (&status = "n" || & status = "u")
{
// do yes stuff (nothing in this case)
}
else
{
// do your not n or u stuff
}
HTH,
Lee
"Brian" <not@given.com> wrote in message
news:C%ple.24$Mi4.23@newsfe2-win.ntli.net...
> Hi all
>
> whats wrong with this?
>
> if ( (strtolower($myrow[status]) != 'n') || (strtolower($myrow[status]) !=
> 'u') ) {
> .......
> }
>
> I'm trying to say if $myrow[status]) if not 'n' or 'u' then do X but it's
> just not
> playing ball here? I have tried putting in brackets, taking them out,
> moving
> them about and all sorts, just can't get it to work
>
>
>
> Brian
>
>
[Back to original message]
|