What are best practices for setting UTF-8 format in PHP scripts?

Setting the UTF-8 format in PHP scripts is important to ensure proper handling of multilingual characters and text. To do this, you can use the `header()` function to set the content type to UTF-8 before any output is sent to the browser. This will ensure that your PHP scripts correctly interpret and display UTF-8 encoded text.

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