At 01:14 AM 7/31/2006, weetat wrote:
Thanks Paul,
Very weird tried Peter's option, it doesn't work.
Btw , how to sort by ascending ?
Please explain what you mean. The current script DOES sort ascending
by country (except for the blank country fields which are placed at the end):
http://juniperwebcraft.com/test/sortTest.php
Singapore, Singapore, Thailand is an ascending sort.
Your original code also sorted ascending by country, but with the
blank countries at the front:
function cmpcountry($a, $b)
{
$country1 = $a['country'];
$country2 = $b['country'];
return ($country1 < $country2) ? -1 : 1;
}
Paul
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php