darwin_tech Posted May 11, 2011 Share Posted May 11, 2011 Hi all, I have a simple mysql table of articles with one Keyword field which can hold an indeterminate number of comma-separated strings per article. I want to create a tag cloud of these keywords and score them according to how many times they appear overall. My question is two-fold. First, I have elected to do this by pulling all the keywords out into an associative array, but I'm not sure how to go about counting the number of times each string appears. Any suggestions? Second. Is this the most efficient way to do this or would it be better to keep another table of keywords and a count field? I guess it wouldn't be much more efficient as I still have to run through all the keywords in the article table to look for new entries and update the keyword table with new words and/ or counter increments. Any suggestions would be much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/236111-keyword-tag-cloud-array-scoring/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.