Use session_unset(). Like this:
' . "\n";
print_r($_SESSION);
print '
' . "\n";
session_unset();
print '
' . "\n";
print_r($_SESSION);
print ' ' . "\n";
?>
This would output:
Array
(
variabletounset => I am going to be unset soon along with all of the other session variables.
)
Array
(
)