What is the correct syntax for using the Location header in PHP to redirect users?

When you want to redirect users to a different page in PHP, you can use the Location header. This header tells the browser to redirect to a new URL. To use the Location header for redirection, you need to set it using the header() function in PHP with the location specified as the value. Make sure to call the header() function before any output is sent to the browser.

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