How can the HTTP header be used to specify the character encoding for output in PHP?

To specify the character encoding for output in PHP, you can use the `header()` function to set the `Content-Type` header with the appropriate charset. This ensures that the browser knows how to interpret the text being sent from the server and display it correctly to the user.

<?php
header('Content-Type: text/html; charset=UTF-8');
?>