Example
Return true if both statements are true:
html
<?php
if (5 > 3 and 5 < 10) {
echo "true";
} else {
echo
"false";
}
?>
Definition and Usage
The and keyword is a logical operator.
Logical operators are used to combine conditional statements.
The return value will only be true if both statements return true, otherwise it will return false.
Tip: The difference between and and && is that and has very low precedence, meaning that most other operations get evaluated first.