session_unregister

int session_unregister(string var) 

Unregisters a variable from the session.

Returns:

TRUE

Unregisters a variable from the session. Use this function when you don’t want the contents of a variable to be saved in the session data.

Version:

Existing since version 4.0

Example:

Unregister a variable
session_start(); 
session_register("counter"); 
session_unregister("counter"); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.