PHP » Operators » !

Syntax:
!expression
expression
Expression of which the logical value should be inverted.

Logical NOT.

This is the logical NOT operator, that turns TRUE into FALSE, and FALSE into TRUE.

Examples

Code:
<?php

$a = FALSE;

if (!$a) {
   print "\$a is FALSE";
}

?>
Output:
$a is FALSE
Explanation:

$a is FALSE, but !$a is TRUE, which means that the if statement evaluates to TRUE and the print statement is executed.