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 following is how to use the similar_text () function:
similar_text($string1, $string2, $percent); //使用此函数后,我们从变量$percent 中获取刚比较的两个字符串的相似度百分比
For more articles related to PHP similar_text string similarity comparison function, please pay attention to the PHP Chinese website!