title: Grouping arrays in PHP
body: <p>I have an array of 200 items. I would like to output the array but group the items with a common value. Similar to SQL's GROUP BY method. This should be relatively easy to do but I also need a count for the group items.</p>
  
  <p>Does anyone have an efficient way of doing this? This will happen on every page load so I need it to be fast and scalable.</p>
  
  <p>Could I prehaps dump the results into something like Lucene or sqlite then run a query on that document on each page load?</p>
  
  <p>Any thoughts would be greatly appreciated.</p>