Calculate the Levenshtein distance between two strings in PHP
Description
The following code shows how to calculate the Levenshtein distance between two strings.
Example
/*from ww w .j a va 2 s . com*/
<?php
echo levenshtein("Hello World","ello World");
echo "<br>";
echo levenshtein("Hello World","ello World",10,20,30);
?>
The code above generates the following result.