Re: array sort question

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

 



On Fri, 1 Oct 2004 22:44:50 -0400, Paul Bissex <paul.bissex@xxxxxxxxx> wrote:
> On Fri, 1 Oct 2004 19:12:30 -0700, Ed Lazor <ed.lazor@xxxxxxxxxxx> wrote:
> > Any ideas on how I could sort this array by Title?
> >
> > $menu[1]["ID"] = 5;
> >
> > $menu[1]["Title"] = "Test 1";
> >
> > $menu[2]["ID"] = 3;
> >
> > $menu[2]["Title"] = "Test 4";
> 
> 
> uasort() is what you need here.
> 
> Also see the usort() documentation page for an example of how to write
> the comparison callback function that you pass to uasort().
> 
> pb
> 
> --
> paul bissex, e-scribe.com -- database-driven web development
> 413.585.8095
> 69.55.225.29
> 01061-0847
> 72°39'71"W 42°19'42"N
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 



-- 
<<--------------------------------------------------------
Jasper Howard - Database Administration
ApexEleven.com
530 559 0107
------------------------------------------------------->>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux