joecooper Posted November 3, 2008 Share Posted November 3, 2008 Is there a simple command that will compare 2 strings and returns how much of a percentage match they are? eg: $string1 = "abc" $string2 = "abd" echo compare($string1, $string2); (and it would echo like 66% match or somthing) Anything simple? Link to comment https://forums.phpfreaks.com/topic/131207-solved-compare-strings-solved/ Share on other sites More sharing options...
joecooper Posted November 3, 2008 Author Share Posted November 3, 2008 Sorry for the waste of a thread, found the answer with google. Heres what i got if anyone else may be interested. similar_text ( string $first , string $second [, float &$percent ] ) Link to comment https://forums.phpfreaks.com/topic/131207-solved-compare-strings-solved/#findComment-681197 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.