What are the best practices for handling character encoding in PHP to ensure proper display of content, especially when dealing with ISO 8859-1 and UTF-8?

When dealing with character encoding in PHP, it is important to ensure that your content is properly encoded to avoid issues with displaying special characters. To handle ISO 8859-1 and UTF-8 encoding properly, you can use functions like `utf8_encode()` and `utf8_decode()` to convert between different encodings as needed.

// Example of converting ISO 8859-1 to UTF-8
$iso_string = "Café";
$utf8_string = utf8_encode($iso_string);
echo $utf8_string;

// Example of converting UTF-8 to ISO 8859-1
$utf8_string = "Café";
$iso_string = utf8_decode($utf8_string);
echo $iso_string;