How can the HTTP header influence the character encoding displayed in browsers when using PHP?

The HTTP header can influence the character encoding displayed in browsers by setting the Content-Type header with the appropriate charset. To ensure the correct character encoding is displayed, you can set the Content-Type header in PHP to specify the charset as UTF-8.

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