Level 74
I would use a many to many for that instead that way the logic would be way easier.
However with your code you can explode the string into an array and then loop over the resulting array looking for matches in your table.
1 like
Summer Sale! All accounts are 50% off this week.
I've posts that have column tags and stored like that (tag1, tag2, tag3)
I want in the single post page to show the related topics depends on the post tags.
How can I do this...
Forexample: I want 10 posts that have at least one of these single post tags.
I would use a many to many for that instead that way the logic would be way easier.
However with your code you can explode the string into an array and then loop over the resulting array looking for matches in your table.
Please or to participate in this conversation.