Question: Can someone help me make something like this? Code below for what I have. I have done the form. I just need help with code
Can someone help me make something like this? Code below for what I have. I have done the form. I just need help with code to count the letters and numbers and where to put it



$keys = range('a', 'z'); $values = array_fill(0, 26, 0); $freq = array_combine($keys, $values); $word = "saapas"; $len = strlen($word); for ($i=0; $i Frequency analysis is the study of the frequency of letters in a text, i.e., the number of occurrences of each letter. In this homework you will create dynamic web pages to perform frequency analysis to a text document entered by the user. You should create two files: hw2 freq form. html and hw2 freq process.php. The file hw2 freq form. html includes a HTML form with a textarea. It collects a text document entered by the user. After the user submits the form hw2 freq process.php processes the data as follows: l) Display the text document that is entered by the user. 2) Change uppercase letters to lowercase letters using the function s 3) Perform frequency analysis find the number of times each lowercase alphabetic letter Ca to 'z') occurs in the text. Display the frequency analysis result in a HTML table in the alphabetic order, i.e. display a list of 26 alphabetic letters and the number of occurrences of each letter. You should write and call your own function freq letter, not use pre-defined PHP functions except strlen function. The function freq letter accepts a string (text document) and a letter, finds and returns the number of times that letter occurs in the string 4) Display the frequency analysis result in a HTML table in the descending order of the letter frequency, from the highest frequency to the lowest frequency, with associated letters. You can use pre-defined PHP functions in this part. Hints: Use the array combine function to create an associative array by using the alphabet array for keys and frequency array for values. Then use one of the sort functions we learned in class to sort the new array as required. Frequency analysis is the study of the frequency of letters in a text, i.e., the number of occurrences of each letter. In this homework you will create dynamic web pages to perform frequency analysis to a text document entered by the user. You should create two files: hw2 freq form. html and hw2 freq process.php. The file hw2 freq form. html includes a HTML form with a textarea. It collects a text document entered by the user. After the user submits the form hw2 freq process.php processes the data as follows: l) Display the text document that is entered by the user. 2) Change uppercase letters to lowercase letters using the function s 3) Perform frequency analysis find the number of times each lowercase alphabetic letter Ca to 'z') occurs in the text. Display the frequency analysis result in a HTML table in the alphabetic order, i.e. display a list of 26 alphabetic letters and the number of occurrences of each letter. You should write and call your own function freq letter, not use pre-defined PHP functions except strlen function. The function freq letter accepts a string (text document) and a letter, finds and returns the number of times that letter occurs in the string 4) Display the frequency analysis result in a HTML table in the descending order of the letter frequency, from the highest frequency to the lowest frequency, with associated letters. You can use pre-defined PHP functions in this part. Hints: Use the array combine function to create an associative array by using the alphabet array for keys and frequency array for values. Then use one of the sort functions we learned in class to sort the new array as required
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
