RE: sorting matrix

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

 



> -----Original Message-----
> From: xxx xxxx [mailto:xde7ori@flash.ro]
> 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: m.ford@lmu.ac.uk
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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux