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 |
write code to find the date difference b/w two given date using PHP not MYSQL function?
3 Answers HyperQuality, Synctra Solutions,
How do you develop your own PHP extension ?
What is the array in php?
Explain different sorting function in php?
what method is used to generate a random number?
What is array filter php?
What type of headers that PHP supports?
Does wordpress run on php 7?
How can you parse files that were not ending with .php by using Apache?
How can you declare the array in php?
How do sessions work in php?
Which framework is best for php?