Jump to content

How to compare variable against another?


tech0925

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.