Is using $_SESSION = array() an effective way to reset session variables and can a similar method be used for $_POST variables?

To reset session variables in PHP, you can use the `$_SESSION = array();` method to clear all session variables. However, this method will not destroy the session itself, so the session ID remains the same. To reset POST variables, you can unset each individual POST variable using `unset($_POST['variable_name']);`.

// Reset session variables
$_SESSION = array();

// Unset individual POST variables
unset($_POST['variable_name']);