Q:
Explain soundex() and metaphone() ?
Answer
soundex()
The soundex() function calculates the soundex key of a string. A soundex key is a four character long alphanumeric string that represent English pronunciation of a word. he soundex() function can be used for spelling applications.
< ?php
$str = "hello";
echo soundex($str);
? >
metaphone()
The metaphone() function calculates the metaphone key of a string. A metaphone key represents how a string sounds if said by an English speaking person. The metaphone() function can be used for spelling applications.
< ?php
echo metaphone("world");
? >
View answer
Workspace
Report Error
Discuss