PHP Classes

Array Treatment: Count array values by given entry names

Recommend this page to a friend!
  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 (9 years ago) RSS 2.0 feedNot enough user ratingsTotal: 295 All time: 7,326 This week: 337Up
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
Name: Muhamed Turkanovic <contact>
Classes: 3 packages by
Country: Slovenia Slovenia
Age: ???
All time rank: 22247 in Slovenia Slovenia
Week rank: 774 Up4 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  
This week:0
All time:7,326
This week:337Up