How many ways you can delete a session variable ?

Answers were Sorted based on User's Feedback



How many ways you can delete a session variable ?..

Answer / prasad

two ways

Seesion_destroy
unset

Is This Answer Correct ?    28 Yes 1 No

How many ways you can delete a session variable ?..

Answer / chetan

session_destroy()
....// it will delete all session variables at once
unset
session_unregister()

Is This Answer Correct ?    4 Yes 0 No

How many ways you can delete a session variable ?..

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

How many ways you can delete a session variable ?..

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

How many ways you can delete a session variable ?..

Answer / hemant gore

unset($_SESSION)
session_unset()
seesion_unregister()
session_destroy()

Is This Answer Correct ?    3 Yes 0 No

How many ways you can delete a session variable ?..

Answer / john suresh

only one way

Is This Answer Correct ?    4 Yes 10 No

Post New Answer

More PHP Interview Questions

How can we upload a file in php?

0 Answers  


How to convert a string to uppercase in php?

0 Answers  


What type of errors can be occurred in php?

0 Answers  


What is the difference between public, protected and private?

0 Answers  


How to split a string into array using php?

0 Answers  


What does $globals mean?

0 Answers  


How long will it take to learn php?

0 Answers  


How do I install php?

0 Answers  


What is super keyword in php?

0 Answers  


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

1 Answers  


What is the difference between explode and split?

0 Answers  


how to register website in internet

2 Answers  


Categories