How to find a similar word for a misspelled one in PHP?

eitanb3

New Member
I'll explain my problem:I have a database table called \[code\]country\[/code\]. It has two columns: \[code\]ID\[/code\] and \[code\]name\[/code\].When I want to search for \[code\]'paris'\[/code\], but misspelled the word: \[code\]'pares'\[/code\] (\[code\]'e'\[/code\] instead of \[code\]'i'\[/code\]), I won't get any result from DB.I want the the system to suggest similar words that could help in the search.So, I am looking for help writing a script that makes suggestions from the DB that contain similar words like: paris, paredes, ... etc.
 
Back
Top