RE: [PHP] Sorting a multidimensional array

2007-02-08 Thread Edward Kay
How about this: http://uk.php.net/manual/en/function.array-multisort.php#53779 Edward > -Original Message- > From: Dave Goodchild [mailto:[EMAIL PROTECTED] > Sent: 08 February 2007 14:30 > To: Roman Neuhauser > Cc: php-general@lists.php.net > Subject: Re: [PHP] Sorting

Re: [PHP] Sorting a multidimensional array

2007-02-08 Thread Németh Zoltán
array_multisort? http://php.net/manual/en/function.array-multisort.php hope that helps Zoltán Németh On cs, 2007-02-08 at 14:08 +, Dave Goodchild wrote: > Hi all. I am building an online events directory and as part of the system > users can search for events by date, category etc. > > The

Re: [PHP] Sorting a multidimensional array

2007-02-08 Thread Dave Goodchild
Thanks for that - can't do that as all I know in the database is the start and end date for each event (so I don't have to create mapping tables and perform massive joins), the rest is handle dynamically. I think I can do it using usort, this seems to work, any comments? function compare($x, $y)

Re: [PHP] Sorting a multidimensional array

2007-02-08 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-02-08 14:08:13 +: > Hi all. I am building an online events directory and as part of the system > users can search for events by date, category etc. > > The logic involved in finding events that match the user-entered dates works > like so: > > 1. we create a range o

[PHP] Sorting a multidimensional array

2007-02-08 Thread Dave Goodchild
Hi all. I am building an online events directory and as part of the system users can search for events by date, category etc. The logic involved in finding events that match the user-entered dates works like so: 1. we create a range of dates from the start and end dates specified by the user 2.