scottybwoy Posted August 12, 2008 Share Posted August 12, 2008 Is this : if($cat !== 1|6) { The right way to go about it. If so why doesn't it seem to work? P.S. $cat is an integer between 1-8. Link to comment https://forums.phpfreaks.com/topic/119305-solved-super-easy-question/ Share on other sites More sharing options...
sasa Posted August 12, 2008 Share Posted August 12, 2008 if($cat != 1 and $cat !=6) { Link to comment https://forums.phpfreaks.com/topic/119305-solved-super-easy-question/#findComment-614555 Share on other sites More sharing options...
Prismatic Posted August 12, 2008 Share Posted August 12, 2008 if($cat != 1 and $cat !=6) { Interesting.. I did not know and was a substitute for && Learn something new every day Link to comment https://forums.phpfreaks.com/topic/119305-solved-super-easy-question/#findComment-614574 Share on other sites More sharing options...
discomatt Posted August 12, 2008 Share Posted August 12, 2008 if($cat != 1 and $cat !=6) { Interesting.. I did not know and was a substitute for && Learn something new every day It's not a direct substitute, and they aren't identical. Read here http://www.php.net/manual/en/language.operators.logical.php Link to comment https://forums.phpfreaks.com/topic/119305-solved-super-easy-question/#findComment-614637 Share on other sites More sharing options...
.josh Posted August 12, 2008 Share Posted August 12, 2008 Looks like you might possibly want to look into range or in_array Link to comment https://forums.phpfreaks.com/topic/119305-solved-super-easy-question/#findComment-614642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.