if (isset($_POST['calc'])){
$text = $_POST['text'];
$length = strlen($text);
for ($ascii_character = 0 ; $ascii_character < 244 ; $ascii_character++){
for ($text_character_number = 0; $text_character_number < $length; $text_character_number++){
$ord = ord($text[$text_character_number]);
if ($ascii_character == $ord){
$count++;
}
}
if($count != 0){
$exit = $count/$length*100;
echo "Количество букв ".chr($ascii_character)." в этом тексте равно: ".round($exit,2)." %</br>";
}
$count = 0;
}
}