Information Technology Questions and Answers Community

Unset variable

How can you unset a single session variable in PHP? 

PHP        
Your Answer: 

1 Answers

In PHP, it could be done through the following code.

<?php

    unset($_SESSION[‘session_var’]);

?>

Answered On 20 Mar at 09:04
Edit Account
LOGIN INFORMATION
Change Settings
Email Notifications Notifications will be sent to abcd@gmail.com
Select option for your email notifications:
Mature / News Filter We'll send on email when new jobs are posted
Option 2 for email notification We'll send on email when new jobs are posted