Return to Snippet

Revision: 42348
at March 3, 2011 17:06 by chopbust


Initial Code
$str1 = ereg_replace("[^A-Za-z0-9]", "", $str1);
$str2 = ereg_replace("[^A-Za-z0-9]", "", $str2); 
similar_text($str1, $str2, $percent);
//$percent = how much they match!

Initial URL


Initial Description
Get percentage of how much 2 strings matches with each other. Good for comparing things that doesn't have to be an exact match to fit.

Initial Title
Compare 2 set of strings and get percentage of Match

Initial Tags


Initial Language
PHP