Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function is_empty(&$input)
- {
- if(isset($input) && ($input != null) // check to make sure not empty
- && (is_array($input) && count($input) > 0) || // if array, make sure it has an element
- (strlen(trim($input)) > 0) ) // if not array, it should have non zero length
- {
- return false;
- }
- else
- {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement