samshel Posted July 4, 2008 Share Posted July 4, 2008 Hi All, Does anybody have idea about implementing "Did you mean ?" functionality like Google in PHP/MySQL? Let me explain in detail. I have a table containing search words. If a person types a wrong spelling by mistake and submits, the page should look for spellings who are closely matching with the entered word in the search word table and show the alternatives as "Did you mean" ? Example: Person enter "Amsterdm" No Results Found. Did you mean "Amsterdam" ? Thanks Quote Link to comment Share on other sites More sharing options...
interpim Posted July 4, 2008 Share Posted July 4, 2008 have you looked into levenshtein method? http://www.php.net/manual/en/function.levenshtein.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.