Okay - so, I\'ve spent ages searching in Google, and even went through a few specific searches at hotscripts etc., several php forums and this place ... nothing (not of use anyw
I also thought of Hamming distance as Felix Kling commented. Maybe you can make some variant, where you encode your words into specific codewords and then check their distances through an array that holds your codewords.
So if you have array[11, 02, 85, 37, 11], you can easily find that 11 has a maximum distance of 4 in this array.
Don't know if this would work for you, but i think i would do it in a similar manner.