co.ador Posted January 28, 2010 Share Posted January 28, 2010 <?php $cat = isset($_GET['subject']) && is_numeric($_GET['subject'])?$_GET['subject']:null; $prod = isset($_GET['menu']) && is_numeric($_GET['menu'])?$_GET['menu']:null; if($prod && $cat=2, 3) { Then display this. } ?> What i am trying to build above is, If Prod is true and $cat is equal to 2 or 3 then display what ever is inside the brackets. right now the set up above will display a syntax problem. Help. Thank you Link to comment https://forums.phpfreaks.com/topic/190163-help-with-if-statement-logic/ Share on other sites More sharing options...
iPixel Posted January 28, 2010 Share Posted January 28, 2010 if(($prod != ''") && ($cat == 2) || ($car ==3)) Link to comment https://forums.phpfreaks.com/topic/190163-help-with-if-statement-logic/#findComment-1003315 Share on other sites More sharing options...
co.ador Posted January 28, 2010 Author Share Posted January 28, 2010 Thank you I was missing the or || opetator and the $cat in pararenthesis. thank you iPixel. Link to comment https://forums.phpfreaks.com/topic/190163-help-with-if-statement-logic/#findComment-1003319 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.