Negation operator : Logical Operators « Operator « PHP






Negation operator

 
$first_name = 'first';

$last_name = 'last';

<?
if (! strcasecmp($first_name,$last_name)) {
    print '$first_name and $last_name are equal.';
}
?>
  
  








Related examples in the same category

1.Logical Operators in Order of Precedence
2.Use the boolean compare operators
3.Greater than
4.Less than
5.Greate and equal
6.Less than and equal
7.Not equal: !=
8.Logical Operators
9.Logic Operators in PHP
10.Or operator
11.Leap Year Determination
12.The not-equals operator
13.Relational Operators summary table
14.Relational Operators in action