Guest elthomo Posted March 19, 2008 Share Posted March 19, 2008 this looks right from what i can see in the php manual but I'm getting an unexpected , error. if(($error == 0)&&($error2 >0), ($error == 0) or ($error2 > 0)) I'm look to trigger the statement if 1 or both of the variables is true Link to comment https://forums.phpfreaks.com/topic/96903-php-and-or-syntax/ Share on other sites More sharing options...
JD* Posted March 19, 2008 Share Posted March 19, 2008 if((($error == 0)&&($error2 >0)) || ($error == 0) || ($error2 > 0)) Link to comment https://forums.phpfreaks.com/topic/96903-php-and-or-syntax/#findComment-495845 Share on other sites More sharing options...
soycharliente Posted March 19, 2008 Share Posted March 19, 2008 Why are you checking to see if both error is zero and error2 is greater than 0 if you're just going to run the same code if only one of them is satisfied? Link to comment https://forums.phpfreaks.com/topic/96903-php-and-or-syntax/#findComment-495867 Share on other sites More sharing options...
Guest elthomo Posted March 19, 2008 Share Posted March 19, 2008 HAHA thank you :-) Solved Link to comment https://forums.phpfreaks.com/topic/96903-php-and-or-syntax/#findComment-495874 Share on other sites More sharing options...
Guest elthomo Posted March 19, 2008 Share Posted March 19, 2008 Why are you checking to see if both error is zero and error2 is greater than 0 if you're just going to run the same code if only one of them is satisfied? Bad logic on my part. which I have now corrected :-) Link to comment https://forums.phpfreaks.com/topic/96903-php-and-or-syntax/#findComment-495907 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.