Discussion in 'Web Design and Development' started by tektonnic, Jun 7, 2006.

  1. tektonnic macrumors 6502


    Mar 6, 2006
    Bucks, UK
    Hi all,

    Wondered if anyone has any idea where i'd start on making tags like flickr (and other web 2.0 ish) sites have?

    Im creating a recruitment website in PHP with a MySQL job database but would like to have a page on the site with, say 30 tags, font size increased the more often the word is used in job titles, for example the job title "Customer Services Engineer" would create three tags of equal size unless the words are used elsewhere...

    Does anyone know where I would start to do this? Cheers...:confused:
  2. c-Row macrumors 65816


    Jan 10, 2006
    A simple yet always up-to-date approach would be to read all job descriptions from the database, explode() all of them and write them into a single array. Then use array_count_values() [1] on that.

    After that, you could sort it by values so the tag with the highest "use count" would come first.

    [1] http://de2.php.net/manual/en/function.array-count-values.php

Share This Page