PHP session_unset() Function

What is session_unset Function?

Explanation

The "session_unset()" function is used to free all session variables currently registered.

Syntax:


session_unset()

In the above syntax session unset function usually doesnt return anything.

Example :


<?php
session_start();
session_register(array("counter","user"));
session_unset();
?>

In the above example the session unset function unsets all variables associated with a session "counter", "user".

PHP Topics


Ask Questions

Ask Question