PHP Classes

Array Treatment: Count array values by given entry names

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 299 All time: 7,426 This week: 560Up
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: 22527 in Slovenia Slovenia
Week rank: 163 Up1 in Slovenia Slovenia Up
Innovation award
Innovation award
Nominee: 1x

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:299
This week:0
All time:7,426
This week:560Up