Is this bad practice?
if ($_SESSION[\'something\'] == \'\') { echo \'the session is empty\'; }
Is there a way to check if its empty or
The best practice is to check if the array key exists using the built-in array_key_exists function.
array_key_exists
you are looking for PHP’s empty() function