Reply to Re: sort multi-dimensional array

Your name:

Reply:


Posted by gbbulldog on 12/17/02 11:56

Balaskas Evaggelos wrote:
> Hi,
>
> does anyone know how i can sort a multi-dimensional array
> by a specific field ?
>
> for example i want to sort arr[m][n] where n=2,
> but i need the data of every array to follow that order.
>
> example array:
> arr[0][0]
> arr[0][1]
> arr[0][2]
> arr[0][3]
> arr[0][4]
> arr[0][5]
>
> arr[1][0]
> arr[1][1]
> arr[1][2]
> arr[1][3]
> arr[1][4]
> arr[1][5]

You can use the array_multisort() function to do this. More info and a
number of examples of useage can be found at :
http://uk.php.net/manual/en/function.array-multisort.php

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация