Jump to content

Keyword tag cloud, array scoring


darwin_tech

Recommended Posts

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.

 

Link to comment
https://forums.phpfreaks.com/topic/236111-keyword-tag-cloud-array-scoring/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.