In what situations is it recommended to use header() for redirection instead of include() in PHP scripts?

When you need to redirect the user to a different page or URL, it is recommended to use the `header()` function for redirection instead of `include()`. This is because `header()` sends an HTTP header to the browser, instructing it to redirect to a new location, while `include()` simply includes the content of another file in the current script, without changing the URL in the browser.

<?php
// Redirect to a new page using header() function
header("Location: https://www.example.com/newpage.php");
exit;
?>