When I use the following code, it doesn’t print out “test” until after I refresh the page. I WROTE THIS INCORRECTLY PREVIOUSLY AND AM NOW EDITING. I DON’T WANT IT TO PRINT OUT TESTS. IT SHOULD PRINT OUT NOTHING AT ALL.
unset($_SESSION["product"]);
if ( !empty($_SESSION["product"]) && ($_SESSION["product"] != NULL)) {
echo "test";
}
When I use:
var_dump($_SESSION["product"]);
It shows:
array(0) { }
I’m wondering it that’s the problem. That it’s array(0) when it should be array().