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? Quote 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 ] ) Quote Link to comment https://forums.phpfreaks.com/topic/131207-solved-compare-strings-solved/#findComment-681197 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.