note 33940 added to function.levenshtein
| From: | \ | Date: | Fri, 11 Jul 2003 15:22:12 +0000 |
| Subject: | note 33940 added to function.levenshtein | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-51917@lists.php.net to get a copy of this message | ||
I am using this function to avoid duplicate information on my client's database.
After retrieving a series of rows and assigning the results to an array values, I loop it with
foreach comparing its levenshtein() with the user supplied string.
It helps to avoid people re-registering "John Smith", "Jon Smith" or "Jon
Smit".
Of course, I can't block the operation if the user really wants to, but a suggestion is
displayed along the lines of: "There's a similar client with this name.", followed by
the list of the similar strings.
----
Manual Page -- http://www.php.net/manual/en/function.levenshtein.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33940
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33940&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33940&report=yes