looking for a Function processing a 2-dim array.
Posted: Tue Jan 20, 2009 9:38 am
I have a 2-dimensional array .. with following sample data:
#1 abc@gmail.com
#2 avneek@hotmail.com
#3 suresh@uk2.net
#4 suresh@uk2.net
#5 abc@gmail.com
where first column depicts serial number and second depicts email addresses.
Is there any function available in PHP which can help me process this array and produce a result much like Group-by/count function in SQL. something like :
2 abc@gmail.com
1 avneek@hotmail.com
2 suresh@uk2.net
Where first column depicts number of repetitions of every unique email address.
I hope i have framed my question clear enough.
#1 abc@gmail.com
#2 avneek@hotmail.com
#3 suresh@uk2.net
#4 suresh@uk2.net
#5 abc@gmail.com
where first column depicts serial number and second depicts email addresses.
Is there any function available in PHP which can help me process this array and produce a result much like Group-by/count function in SQL. something like :
2 abc@gmail.com
1 avneek@hotmail.com
2 suresh@uk2.net
Where first column depicts number of repetitions of every unique email address.
I hope i have framed my question clear enough.