Jump to content

help with if statement logic.


co.ador

Recommended Posts

 

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.