Array group and sum values.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have this:

while ($row = mysql_fetch_array($theData[0])) {

    $col1[] = $row[0];
    $col2[] = lookup($row[1]); // this goes off and gets the country name.

I then loop through col1 and col2 to produce something like this:

52  	ARMENIA
215 	CANADA
57 	CANADA
261 	COLOMBIA
53 	EGYPT
62 	INDIA
50 	INDIA

Is there a way I can group these?

Thanks!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux