dubc07 Posted August 20, 2008 Share Posted August 20, 2008 I'm having a problem passing yes and no. <?php $ticket = 'Awesome'; if ($ticket == 'cool' or 'not cool' or 'wow')///// i have also tried the || in or's place $pass = 'YES'; else{ $pass = 'NO'; } echo $pass; This echo's yes for some reason when it should echo no. It works great if it is one ---> ($ticket == 'cool' ) but when i add or it Fry's Any ideas? ?> Quote Link to comment Share on other sites More sharing options...
php_dave Posted August 20, 2008 Share Posted August 20, 2008 if ($ticket == "cool" || $ticket == "not cool" || $ticket == "wow") { $pass = "YES"; } else { $pass = "NO"; } 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.