Jump to content

[SOLVED] Is there a limit to an If() statment for AND && conditions?


Stryves

Recommended Posts

Just curious if anyone had any issue's with have 4 && conditions in an IF statement.

 

I've had several fail checks, and I don't know why.

 

If I do

1==1 && 2==2 && 3==3

It will work fine... if I do

1==1 && 2==2 && 3==3 && 4==4

it fails?

 

It's easy to work around, just have if 1==1 then check if 2==2 - 4==4 etc... but wasn't sure if it's known issue?

like a charm.....

 

also what version of php are you using?  ive got 5.2.5.

<?php
if( 1==1 && 2==2 && 3==3 && 4==4 && 5==5 && 6==6){
echo('hello');
}
else{
echo'fuck';

}

I doubt PHP versions has to do with anything, but you never know  ;D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.