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