Compare group of tags to find similarity/score with PHP/MySQL

后端 未结 2 751
野趣味
野趣味 2021-02-04 17:01

How can I compare a group of tags to another post\'s tags in my database to get related posts?

What I\'m trying to do is compare a group of tags

2条回答
  •  悲哀的现实
    2021-02-04 17:44

    Put the tags into an array. Each array being respectively called Post A / Post B etc. Then use array_diff_assoc(), to figure out how different the arrays are.

    But really, Ivars solution would work better, this is easier to understand though :)

提交回复
热议问题