$_SESSION = array(); session_destroy(); code example Example: clear session php <?php unset($_SESSION['counter']); ?>