Thread: syntax error???
View Single Post
Old 08-03-2011, 04:17 PM   #5 (permalink)
maeltar
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default

Now if you "invert" the selection using the logical NOT symbol !

Code:
<?php

$up = 2;
$app = 2;
$dep = 2;
$sold = 2;

  If ( !( ($up == 2) || ($app == 2) || ($dep == 2) || ($sold == 2) ) )
  {
      echo "OR is TRUE<br />";
  } else{
      echo "OR is FALSE<br />";
  }
  
  If ( !( ($up == 2) && ($app == 2) && ($dep == 2) && ($sold == 2) ) )
  {
      echo "AND is TRUE<br />";
  }else{
      echo "AND is FALSE<br />";
  }
?>
__________________
Thanks... Simon

Sex, Drugs & Linux Rules

Last edited by maeltar : 08-03-2011 at 05:32 PM.
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote