What are the best practices for displaying text output and handling redirection in PHP scripts?
When displaying text output in PHP scripts, it is best practice to use the `echo` or `print` functions to output text to the browser. To handle redirection, you can use the `header()` function to send a raw HTTP header to redirect the user to a different page.
// Displaying text output
echo "Hello, World!";
// Handling redirection
header("Location: https://www.example.com");
exit();