What are the best practices for specifying character encoding in PHP for multilingual websites?

When working on multilingual websites in PHP, it is important to specify the character encoding to ensure that special characters and different languages are displayed correctly. One of the best practices for specifying character encoding in PHP is to set the encoding in both the HTML meta tag and in the PHP header. This helps ensure that the browser knows how to interpret the characters being displayed on the website.

// Specify character encoding in HTML meta tag
<meta charset="UTF-8">

// Specify character encoding in PHP header
header('Content-Type: text/html; charset=UTF-8');