Is this bad practice?
if ($_SESSION['something'] == '')
{
echo 'the session is empty';
}
Is there a way to check if its empty or it is not set? I'm actualy doing this:
if (($_SESSION['something'] == '') || (!isset($_SESSION['something'])) {
echo 'the session is either empty or doesn\'t exist';
}
Does !isset
just checks if a $_SESSION['']
exist and doesn't check if, is there are values in the array or not