1 2 3 4 5 |
if (empty($var)) { echo "The variable is empty"; } |
You can also use not empty, by adding an exclamation mark.
1 2 3 4 5 |
if (!empty($var)) { echo "The variable has something stored"; } |
© 2022 CODEHAVEN