There are three "levels" of checking in php:
- array_key_exists($key, $array) - http://php.net/manual/en/function.array-key-exists.php
Checks if a key exists in an array. Returns true even if the value is null
- isset($array[$key]) - http://php.net/manual/en/function.isset.php
Check if a key exists and is not null - Returns true if the value exists and is not null, but it can be bool(false), int(0), string "" and so on.
- !empty($array[$key]) - http://php.net/manual/en/function.empty.php
Check if a key exists and is truthy, returns false for bool(false), int(0), non-existant keys and null, but true for bool(true), int(1), int(-1), string with length > 0 and so on. Actually the function it is empty(), but often used negated, too. This should be what you are searching for.