Question: PHP Programming Generate a start.html file that with a button that should link to a file named analyze.php . Use the random.txt file. Read the

PHP Programming

Generate a start.html file that with a button that should link to a file named analyze.php. Use the random.txt file. Read the file into a data structure of your choice. Make an associative array that keeps a count of each word (use the word as an index into the array). Count how many times each word occurs in the random.txt file. Then, get a percentage for each word. Write the results to a file rate.txt.

This is an example format with made up values:

amazing:16:1.88%

screen:11:1.27%

The first field is the word, the second field is the count from your associative array, and the third field is the frequency of the word. The file MUST BE SORTED (ksort()).The information should be printed IN A TABLE. The table should also be sorted.

input.txt

recitative,peptises,tarps,pentagram,laic,interwoven,antidote,questioningly,pedantries,overindulgence,moralist,subtractions,shrinking,core,shrewsbury,heartsease,consignee,qdos,femaleness,pasty,fracases,cock,checkmating,summonsed,dehumidifier,jaw,simons,elegized,sermonized,dichotomised,spearheads,thanklessly,wensley,unclench,catastrophes,tankages,crispers,daystar,bedford,fezzes,trotters,languishes,roofed,simons,autocratic,totalized,instilling,dements,finely,scolding,aesthetically,sublimely,reinstates,equivalence,incorporator,fleeter,noisier,dementia,masseurs,categorization,tautest,dwindles,undeserving,greece,transmutations,guidepost,cruciform,upfront,pasty,schoolrooms,centilitres,hyperbolize,rococo,llamas,poetizes,ceaselessly,gland,rustics,noisier,readability,fenchurch,untenantable,coelacanths,riyadh,monterey,finely,tepid,baronum,dichotomised,astounding,burgh,immeasurable,jotted,enamoured,inquisitors,concision,helices,christianizes,brines,columbium,advertising,defense,untried,onetime,kindergartener,cocoons,undisciplined,hangings,ebonies,transmutations,crackling,unexcited,columbium,cosmetically,megabit,prolongation,enamoured,decisions,woodwind,scuffs,graphic,intercept,greyest,bicarbonates,slumberous,jeer,whirls,humeri,cock,mala,reconvicts,sackcloth,theorise,kilocycle,antiparticles,construes,memorises,cosies,untried,fabian,brunswick,llamas,liar,heartsease,quarrelling,carnivals,supervenes,subsidises,costermongers,scuffs,looe,consommes,abstaining,proving,supervisions,atoms,traced,evasion,crispers,vegetative,crispers,op,premiums,casualty,gustiest,chairmen,bournemouth,sensuousness,kitting,scilicet,malfeasant,mandrakes,narrs,mightily, greyest

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!