I have an input box where users can enter tags when they ask a question. They are separated by commas, like this:
test1, test2, test3, test4
My questions table structure is:

To show the tags of a question I just use explode(",", $qinfo['tags']) and then a foreach loop.
But, I don’t know how I can display tags from most popular to least popular on a separate “popular tags” page.
Thanks for any help!
You should create
tagsandquestions_tagstable.And get tags sorted by popularity:
But I suggest you to keep the
tagsfield in thequestionstable. Use it for caching. eg: if you’re displaying a single question, no need to query thetagsandquestions_tagstable.