br3nn4n Posted January 6, 2008 Share Posted January 6, 2008 Codey-code: <?php if (!isset($_GET['dog'])) || (!isset($_GET['cat'])) ?> Firstly, is there even a way to do and-or in PHP, something like this: &| ? And this is the parse error I get with the above code-- Parse error: syntax error, unexpected T_BOOLEAN_OR TIA Link to comment https://forums.phpfreaks.com/topic/84784-isset-for-two-items/ Share on other sites More sharing options...
GingerRobot Posted January 6, 2008 Share Posted January 6, 2008 The OR operator is, in effect, an AND OR operator, since it returns true if either or both statements are true. As for the above code, you've an extra closing bracket. Try: <?php if (!isset($_GET['dog']) || (!isset($_GET['cat'])) ?> Link to comment https://forums.phpfreaks.com/topic/84784-isset-for-two-items/#findComment-432120 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.