How can the encoding of a file be converted to UTF-8 in PHP?
To convert the encoding of a file to UTF-8 in PHP, you can read the file content using the original encoding, then convert it to UTF-8 using the `iconv()` function, and finally write the converted content back to the file.
$originalContent = file_get_contents('file.txt');
$utf8Content = iconv('ISO-8859-1', 'UTF-8', $originalContent);
file_put_contents('file.txt', $utf8Content);