I'm looking for help on writing a script to check a list of phrases/words and compare them to one another and see which one is the properly typed phrase/word.
$arr1 = array('fbook', 'yahoo msngr', 'text me later', 'how r u');
$arr2 = array('facebook', 'yahoo messenger', 'txt me l8r', 'how are you');
So, in comparing each index in each array, it should go through each array and compare both values. In the end, it should produce:
facebook
yahoo messenger
text me later
how are you
Any help, I appreciate it!
You need to define some rules while processing these words. By your example, you need a regex and you want the keyword that has a longer length, but there might be cases longer length might not work.