Question: This question is designed to have you work with files, as well as string and array manipulation in PHP. You should start with a simple



This question is designed to have you work with files, as well as string and array manipulation in PHP. You should start with a simple form which contains a text area where the user can enter a string of text, a textbox for an optional search term, and a file upload field which allows them to upload a file which contains multiple lines of text (with the file each line should be treated as a separate string). The user can enter a string and upload a file in the same submission of the form. For the text file you will have multiple sets of the output below, one corresponding to each line in the file. On submission of the form, you should output following for each string: The original string (formatted in a way to make it obvious it's the start of that output) The number of commas in each string The number of common punctuation characters in each string (for simplicity, we'll consider them to be characters with an ascii value between 32-47) The string re-ordered so the words are in descending alphabetical order (irrespective of case). The string as a proper title (first letter of each word capitalized, all others lower case). The middle-third characters of the string, if the string isn't evenly divisible by three, you should take the lower of the two starting positions For the single string: if a search term is provided, output the string with the search term highlighted (by wrapping the term in a span with an appropriate class). For the file upload:, if a search term is provided output only the strings that contain the search term (with the search term highlighted) and a count of the number of strings that did not have the term
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
