0

How to clear all variable php , session , array when user log out ?

now i use session_destroy(); for clear all session.

But i want to know how can i clear all php var and php array ?

peat ribersal
  • 93
  • 1
  • 7
  • 7
    Possible duplicate of [Unset all variables in PHP script](http://stackoverflow.com/questions/26247974/unset-all-variables-in-php-script) – Aviram Nov 30 '15 at 07:53

1 Answers1

0

simple use unset variable like

session_destroy();

unset($_SESSION["id"]); unset($_SESSION["userid"]);