Login   Register  
PHP Classes

Array Treatment: Count array values by given entry names

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-12-15 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 272 All time: 6,826 This week: 1,461Up
Version License PHP version Categories  
array-treatment 1.0Artistic License3.0Data types, Math
Description Author  

This class can be used to count array values by given entry names.

It traverses a given array of associative array values and group all entries that have the same value of a given entry.

The class returns an associative array with key entries defined by one given entry, summing all values of another given entry.

Innovation Award  
PHP Programming Innovation award nominee
December 2010
Number 6

Prize: One year subscription to the PDF edition of the JSMag magazine
Sometimes you need to sum the values of a given column returned by a database query result and group the results by values of another column.

This class provides a solution for summing values returned in an array just like you would be able to do using SQL GROUP BY clause and SUM function.

Manuel Lemos
Picture of Muhamed Turkanovic
Name: Muhamed Turkanovic <contact>
Classes: 3 packages by
Country: Slovenia Slovenia
Age: ???
All time rank: 21067 in Slovenia Slovenia
Week rank: 1077 Up3 in Slovenia Slovenia Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file ArrayTreatment Class function code

 Version Control Unique User Downloads Download Rankings  
 0%Total:272All time:6,826
 This week:0This week:1,461Up