tech0925 Posted January 31, 2012 Share Posted January 31, 2012 I run an article directory. I was wondering how I could check an article that is currently pending review against published articles in our database. What I am looking to do is to place the content of the body in the pending article into a variable. That much is easy and I know how to do that. Then I would like to use that variable to compare against other content in our database and have it output a percentage of how close it is to any other article already published in our database. Any direction our guidance with this would be so greatly appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/256136-how-to-compare-variable-against-another/ Share on other sites More sharing options...
digibucc Posted January 31, 2012 Share Posted January 31, 2012 similar text and/or levenshtein int similar_text ( string $first , string $second [, float &$percent ] ) int levenshtein ( string $str1 , string $str2 ) http://php.net/manual/en/function.similar-text.php http://www.php.net/manual/en/function.levenshtein.php Link to comment https://forums.phpfreaks.com/topic/256136-how-to-compare-variable-against-another/#findComment-1313058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.