RE: [PHP-DB] sorting matrix
> -Original Message- > From: xxx [mailto:[EMAIL PROTECTED]] > Sent: 13 January 2003 14:25 > > Hy, > I have a matrix with strings ex. 4 cols and many rows > how could I sort the matrix after the 2nd field with > maintaining the indexes order > > Like in a table > > name surname age address.. > i have many records and i'd like to print the records in age > order ascendent or after the surname order... You need array_multisort(): see http:///www.php.net/array_multisort or http:///ro.php.net/array_multisort (site partially translated into Romanian, but unfortunately not this page!). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sorting matrix
Hy, I have a matrix with strings ex. 4 cols and many rows how could I sort the matrix after the 2nd field with maintaining the indexes order Like in a table name surname age address.. i have many records and i'd like to print the records in age order ascendent or after the surname order... it's not a result from a query..just a simple matrix with strings and numbers... i've tried "asort" function like: asort($matrix[1],SORT_STRING) but it doesn't work... thanks a lot... cybercop78 PS :if there are "friends" from romania and know well programming in php please send me a reply in order to "combine our powers" or to make useful things or projectsi'm not a "newbie" and i don't want to colaborate with "newbies"...thanks http://www.idilis.ro - Stiri, e-mail gratuit, download, SMS, server de counter-strike, hosting gratuit, servicii internet... Fii cu un pas inaintea celorlati! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php