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 |
How can we upload a file in php?
How to convert a string to uppercase in php?
What type of errors can be occurred in php?
What is the difference between public, protected and private?
How to split a string into array using php?
What does $globals mean?
How long will it take to learn php?
How do I install php?
What is super keyword in php?
hi sir am kiran kumar finished my mca 2009 passed out sir .. i have more doubts regarding open source technologies sir if we pass zend exam in php can we get a job opportunity in foreign countries sir and is it good demand for php compared to dot net and java and some other technologies like sap , erp sir bcoz my friends saying they are finished dot net and java courses they telling in php we cannot earn more and we cannot go onsite opportunity even big companies not dealing with php is it right ah sir ? please send ur valuable suggestions to my email sir kiranpulsar2007@gmail.com please send ur phone number also sir thanking u sir
What is the difference between explode and split?
how to register website in internet