PHP 提供了一個極少使用的 similar_text 函數,但此函數非常有用,用于比較兩個字符串并返回相似程度的百分比。
similar_text($string1, $string2, $percent);
//$percent will have the percentage of similarity
PHP 提供了一個極少使用的 similar_text 函數,但此函數非常有用,用于比較兩個字符串并返回相似程度的百分比。
similar_text($string1, $string2, $percent);
//$percent will have the percentage of similarity