Hi all,
I'm working on an app that lets users post artilces on different topics.. what I'm trying to do is display articles that are related to the one that a user is currently reading.
How would I go about comparing one article to another 1000+ plus articles, and then displaying the top 10 most similar articles on the same page as the one that is already open?
Should I be using the PHP 'similar_text' function?
So something like..
So I guess I could query the current article in the place of "Hello World", and then somehow query and loop through the remaining 1000+ articles in the place of "Hello Peter". Does make sense? Is the a good way to go about his? Any suggestions?
I'm working on an app that lets users post artilces on different topics.. what I'm trying to do is display articles that are related to the one that a user is currently reading.
How would I go about comparing one article to another 1000+ plus articles, and then displaying the top 10 most similar articles on the same page as the one that is already open?
Should I be using the PHP 'similar_text' function?
So something like..
PHP:
<?php
similar_text("Hello World","Hello Peter",$percent);
echo $percent;
?>
So I guess I could query the current article in the place of "Hello World", and then somehow query and loop through the remaining 1000+ articles in the place of "Hello Peter". Does make sense? Is the a good way to go about his? Any suggestions?