Browse free website templates that organized by category.
This video tutorial covers PHP logical operators.
The logical operators that are used in PHP are listed in the table below.
| Operator | Description | Example |
|---|---|---|
| && | and |
x = 10 y = 5 (x < 15 && y > 1) returns true |
| || | or |
x = 10 y = 5 (x == 3 || y == 3) returns false |
| ! | not |
x = 10 y = 5 !(x == y) returns true |