FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » AND and OR
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: AND and OR [message #182573 is a reply to message #182567] Fri, 16 August 2013 15:42 Go to previous message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma:
Senior Member
On 2013-08-16 6:25 AM, The Natural Philosopher wrote:
> On 16/08/13 01:21, Twayne wrote:
>> Hi,
>>
>> Doing code cleanup; something that seemed so simple is giving me lots
>> of trouble for whatever reason.
>>
>> Win 7, XAMPP, PHP 5.3, online forms:
>>
>> In my cleanup efforts I've been trying to concatenate statements for
>> things like the following:
>>
>> IF(strlen(var1) == 0) OR strlen(var2) == 0) OR strlen(var3) ==0))
>> {

>> ...

>>
>
> your brackets are screwed.
>
> if ((strlen(var1) == 0) || (strlen(var2) == 0) || (strlen(var3) ==0))
>
> will work
> as will
> if (strlen(var1) == 0 || strlen(var2) == 0 || strlen(var3) ==0)
>

Hmm, thanks. I'll look into those formats.

Thanks much,

Twayne`

....
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Function Problem
Next Topic: switch with case 0
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 16:28:51 GMT 2024

Total time taken to generate the page: 0.04742 seconds