What is the purpose of redirecting from PHP to an HTML page automatically?

When you want to automatically redirect users from a PHP page to an HTML page, you can use the header() function in PHP to send a raw HTTP header to the browser, which will redirect the user to the specified HTML page. This can be useful for various reasons, such as redirecting users after a form submission or when a certain condition is met.

<?php
header("Location: example.html");
exit();
?>