Welcome Guest, Not a member yet? Register   Sign In
Grouping and Sorting Arrays
#2

[eluser]richthegeek[/eluser]
Code:
$companies = array();
foreach( $people as $person ) $companies[ $person->company_id ][] = $person;

bam.


Messages In This Thread
Grouping and Sorting Arrays - by El Forum - 08-12-2009, 04:47 AM
Grouping and Sorting Arrays - by El Forum - 08-12-2009, 08:06 AM
Grouping and Sorting Arrays - by El Forum - 08-12-2009, 08:11 AM
Grouping and Sorting Arrays - by El Forum - 08-12-2009, 08:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB