Created
April 21, 2018 14:31
-
-
Save locvfx/65261906e9ef50b580921f1b69515add to your computer and use it in GitHub Desktop.
PHP - Check variable's type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (is_numeric($param)) { | |
//TRUE | |
} | |
else { | |
//FALSE | |
} | |
if (!empty($param)) { | |
//not empty | |
} | |
else { | |
//empty or NULL | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment