how to end a session in php code example
Example 1: end session variable php
// destroy the session
<?php
session_destroy();
?>
Example 2: clear session php
<?php
unset($_SESSION['counter']);
?>
// destroy the session
<?php
session_destroy();
?>
<?php
unset($_SESSION['counter']);
?>