Помогите настроить кодировку:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title> Моя страница </title>
</head>
<body>
<?php
$data = preg_split('/\s/', file_get_contents("file.txt"));
function cmpLength($a, $b)
{
$lena = strlen($a);
$lenb = strlen($b);
if ($lena == $lenb)
{
return 0;
}
return ($lena < $lenb) ? -1 : 1;
}
uasort($data, 'cmpLength');
echo 'Самое длинное слово: "' . array_pop($data) . '"';
?>
</body>
</html>
|