Reply to Re: Complex array sorting

Your name:

Reply:


Posted by cronet on 11/27/07 19:32

On 27 Nov., 19:15, "Shelly" <sheldonlg.n...@asap-consult.com> wrote:
> cronet wrote:
> > Hi,
>
> > i want to do some sortings to a complex array.
> > The array structure is at the end of this message
>
> > Now I want the result sorted in that way:
> > SingleRoom ($hotel[0][Rooms][0][max_persons]) - lowest rate ($hotel[0]
> > [Rooms][0][overall])
>
> How did you fill the array? I assume it was from a database search. If so,
> why not simply let SQL do the sorting for you.. All you need then would a
> clause such as ORDER BY room_size, rate, max_people DESC.
>
> Shelly

Thanks for reply.

Sorry. I didn't wrote that. It's both. Some data I get from a MySQL
Database, and especially the [Rooms] i get from a Webservice as XML
File, which I added in a foreach to every parent...
I can't tell the webservice in what sorting order they shall send me
the data...

[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

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