Counts the frequency of words in the file.
Now let's test the script, please create a file named words.txt with the following content in the same directory where you placed the above script: words.txt Input: Hi Harshi. How are you? I hope you are good. I am also good.
Output: Array ( [hi] => 1 [harshi] => 1 [how] => 1 [are] => 2 [you] => 2 [i] => 2 [hope] => 1 [good] => 2 [am] => 1 [also] => 1 )