MrXander Posted September 11, 2007 Share Posted September 11, 2007 Can anyone tell me why this isn't working? <?php if ($gen == "2" || "3"){ echo "Yes"; } ?> ??? Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 11, 2007 Share Posted September 11, 2007 Because "3" is not a statement. if($gen=='2' || $gen=='3'){ } Why are you using strings here? Quote Link to comment Share on other sites More sharing options...
effigy Posted September 11, 2007 Share Posted September 11, 2007 If you have more comparisons to do use in_array. Quote Link to comment Share on other sites More sharing options...
MrXander Posted September 11, 2007 Author Share Posted September 11, 2007 If you have more comparisons to do use in_array. Thanks effigy :-) 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.