PHP Unset Session Variable
You can unset session variable using: session_unset – Frees all session variables (It is equal to using: $_SESSION = array(); for older deprecated code) unset($_SESSION[‘Products’]); – Unset only Products index in session variable. (Remember: You have to use like a function, not as you used) session_destroy — Destroys all data registered to a session To know the difference between using session_unset and session_destroy, … Read more