Ok. As far as I can tell from your example - you have a single
multidimensional array. From my reading of array_multisort
it looks like it is supposed to sort multiple arrays that happen
to be the same length, which is a little different.

Conceptually, what I think you have is an array of records which
you want to sort by one of the elements in the record. What I think
you want is "uasort", with something like:

function compare( $left, $right )
{
     return ( $left[keycount] - $right[keycount] );
}

uasort( $result, "compare" );


At 03:43 26/09/2001 -0700, Richard Baskett wrote:
>Ok i've gone through the archives.. and you know.. I don't think anybody
>really understands this function.  I hope I am wrong, but here goes.
>
>I have an array called let's say.. $results
>first dimension are just numbers
>and the second has associative names [name],[title],[descript],[keycount] so
>basically
>
>$result[0][name]
>$result[0][title]
>$result[0][descript]
>$result[0][keycount]
>
>The first dimension goes up to hmm.. in the three digits and each has the
>four other "categories",  I want to sort $result by [keycount] which are all
>numbers.
>
>How the umm.. heck do you use that funky array_multisort function?
>
>Rick
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to