How can PHP headers be used to implement automatic redirection on a webpage?

To implement automatic redirection on a webpage using PHP headers, you can use the header() function to send a raw HTTP header to the browser. You can set the "Location" header to the URL you want to redirect to. Make sure to call the header() function before any output is sent to the browser.

<?php
// Redirect to a specific URL
header("Location: https://www.example.com");
exit;
?>