Re: [PHP] Sorting an array of arrays....

2002-02-14 Thread Toni Kustiana
try to add to your script: function cmp ($a, $b) { return strcmp($a["3"],$b["3"]); } usort($data, "cmp"); "Fifield, Mike" <[EMAIL PROTECTED]> wrote: What I am trying to do is sort a array of arrays but I want to sort by one of the pieces of data stored in the arrays inside the array. For

Re: [PHP] Sorting an array of arrays....

2002-02-14 Thread Lars Torben Wilson
On Thu, 2002-02-14 at 08:26, Fifield, Mike wrote: > What I am trying to do is sort a array of arrays but I want to sort by one > of the pieces of data stored in the arrays inside the array. For example; > $data[blue] = array("name", "age", "time", "3"); > $data[green] = array("name", "age", "time"

RE: [PHP] Sorting an array of arrays....

2002-02-14 Thread Fifield, Mike
D] Subject: RE: [PHP] Sorting an array of arrays Good day, uasort() should do what you need. http://www.php.net/manual/en/function.uasort.php There's an example for the usort function that does something similar to what you want, in fact. Darren Gamble Pl

RE: [PHP] Sorting an array of arrays....

2002-02-14 Thread Darren Gamble
Good day, uasort() should do what you need. http://www.php.net/manual/en/function.uasort.php There's an example for the usort function that does something similar to what you want, in fact. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Ave