PDA

View Full Version : dual conditional


sabret00the
02-01-2005, 10:34 AM
what i'm trying to do is


$appendix_a = TRUE;
$appendix_b = TRUE;

$appendix_overide = TRUE;

if ($appendix_a AND $appendix_b OR $appendix_overide)
{
$showappendix = "value";
}

so basically it's an if theirs two of on value or one of anotherconditional, how do i write that? do i need to encapsulate the firsttwo in brackets or anything of the sort?

Colin F
02-01-2005, 12:07 PM
if (($appendix_a AND $appendix_b) OR ($appendix_overide))
{
//foo
}


should work.

sabret00the
02-01-2005, 12:56 PM
thank you, knew it shoudln't be too hard :)

Colin F
02-01-2005, 01:24 PM
thank you, knew it shoudln't be too hard :)
Looking over it again, you could probably remove two of the brackets, but I tend to bracket everything anyway... :)