PHP provides a rarely used similar_text function, but this function is very useful for comparing two strings and returning the percentage of similarity
The code is as follows
代码如下 |
复制代码 |
similar_text($string1, $string2, $percent);
|
|
Copy code
|
| similar_text($string1, $string2, $percent);
Note: levenshtein() function is faster than similar_text() function. However, the similar_text() function provides more accurate results with fewer modifications required.
http://www.bkjia.com/PHPjc/632269.htmlwww.bkjia.comtrue
http: //www.bkjia.com/PHPjc/632269.htmlPHP provides a rarely used similar_text function, but this function is very useful for comparing two strings And return the percentage of similarity code as follows. Copy the code similar_te...