|
|
Tutorials » Php »
|
Topic |
What is soundex Function?
|
|
Explanation |
|
In PHP, this function is used to calculate the soundex key of a string.
Syntax:
soundex(string)
The above syntax specifies the string to be checked.
Example:
<?php
$str1 = "Gauss";
$str2 = "Ghosh";
echo soundex($str1);
echo "<br />";
echo soundex($str2);
?>
Result:
G200
G200
In the above example we have two strings that sounds similar "Gauss", "Ghosh" which returns the same result.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|