How many ways you can delete a session variable ?
Answers were Sorted based on User's Feedback
Answer / chetan
session_destroy()
....// it will delete all session variables at once
unset
session_unregister()
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / anoop
The correct answer is 4 ways .
1 UNSET();
2 session_unset()
3 seesion_unregister()
4 session_destroy()
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / anuj kumar gupta
session_destroy() — Destroys all data registered to a session
session_unregister() — Unregister a global variable from the
current session
session_unset() — Free all session variables
If globals is on, you'll have to unset the
$_SESSION[varname] as well as the $varname.
Like:
unset($_SESSION[varname]);
unset($varname);
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / hemant gore
unset($_SESSION)
session_unset()
seesion_unregister()
session_destroy()
| Is This Answer Correct ? | 3 Yes | 0 No |
What is inheritance in php?
How does html form submit work?
What is memcache?
What is $_ env in php?
How to get the number of characters in a string?
How to download file in php?
Why do we use session?
How can you declare the array in php?
Which cryptographic extension provide generation and verification of digital signatures?
How can we find the number of rows in a result set using PHP?
How to get the position of the character in a string in php?
How to open a file in php?