How to clear only one variable in the session in php

Discussion in 'PHP' started by dogitalweb, Jul 8, 2010.

  1. #1
    I am developing application which is having lots of session variables in php. I am even using login details in the session too, what i want is to clear few variables but keep my login details in the session, how can i clear particular session variable and not all?
     
    dogitalweb, Jul 8, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    You do either this:
    $_SESSION['watever'] = "";
    PHP:
    Or this:
    unset($_SESSION['watever']);
    PHP:
    :)
     
    Rainulf, Jul 8, 2010 IP