What is the correct way to handle redirection after a certain delay in PHP?

When you want to redirect a user to a different page after a certain delay in PHP, you can achieve this by using the `header()` function along with the `sleep()` function. First, send the headers to indicate a redirect, then use `sleep()` to delay the redirection. After the delay, use `header()` again to specify the new location for the redirection.

<?php
// Redirect after a 5-second delay
header("Refresh: 5; url=destination.php");
echo "You will be redirected to the destination page in 5 seconds...";
sleep(5);
header("Location: destination.php");
exit;
?>