What is the function utf8_decode() used for in PHP?

utf8_decode() is used in PHP to convert UTF-8 encoded strings to ISO-8859-1. This function is useful when dealing with strings that are encoded in UTF-8 but need to be converted to a different character encoding for compatibility with certain systems or applications.

// Example usage of utf8_decode()
$utf8String = "Café";
$isoString = utf8_decode($utf8String);

echo $isoString; // Output: Café