PC Nerd Posted March 29, 2007 Share Posted March 29, 2007 hi guys simple question: if i have a while loop, can i use an || expression, and if both conditions or it true or fals ( as in its not or its and) eg if($a == "abc" || $b == "bcd") { } if both $a and $b were equal to what their teested against, would it still return true? thankx for your help Quote Link to comment Share on other sites More sharing options...
Lytheum Posted March 29, 2007 Share Posted March 29, 2007 Not quite sure what you're asking, but if: if($a == "abc" || $b == "bcd") { $a = abc; $b = bcd; //returns true $a = kds; $b = bcd; //returns true $a = 123; $b = 456; //returns false } Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted March 29, 2007 Author Share Posted March 29, 2007 thats exactly it, thankyou Quote Link to comment Share on other sites More sharing options...
Lytheum Posted March 29, 2007 Share Posted March 29, 2007 No problem, glad I could help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.