Soundex
(PHP3, PHP4)
Soundex---&http://www.aliyun.com/zixun/aggregation/37954.html ">nbsp; To calculate the pronunciation key for a string
Syntax: String soundex (String str)
Description:
Evaluates the pronunciation key (soundex key) value of the string str.
One feature of the pronunciation keys is that the same pronunciation word produces the same pronunciation key. If you know the pronunciation of the word but do not know how to spell, you can use this feature, in the database to make a simple search. This function returns a 4-character string that begins with a letter.
This particular function is described by Donald Knuth in "The Art of Computer Programming, vol. 3:sorting and Searching", AW (1973), pp. 391-392.
Example:
Soundex ("Euler") = = Soundex ("ellery") = = ' E460 ';
Soundex ("Gauss") = = Soundex ("Ghosh") = = ' G200 ';
Soundex ("Knuth") = = Soundex ("Kant") = = ' H416 ';
Soundex ("Lloyd") = = Soundex ("Ladd") = = ' L300 ';
Soundex ("Lukasiewicz") = = Soundex ("lissajous") = = ' L222 ';