Show the Most Popular Categories with PHP

This week, we'll be going over a quick way to determine what the most popular tags are in a series of tagged entries.

Files and Data Required for This Exercise

Files

  • popular_tags.php — This will contain the dummy code and the function to process it
  • Data
  • Tags — An array of comma-delimited strings containing tags
  • Parsing Function — Function to break apart the array and determine which tags are the most popular
  • The Tag Sets

    For this exercise, we'll be using a comma-delimited string (i.e. "tag 1, tag 2, tag 3, etc.") as a set, and we'll assume that there are multiple entries, each with a set of tags generated by the user.

    Pretty much every blog, bookmarking resource, and app these days features tagging in some capacity. Tags help users quickly identify what an... read more

    • «
    • 1
    • »