Posted by Janwillem Borleffs on 06/26/06 21:12
StevePBurgess@gmail.com wrote:
> I just can't seem to get it to work. I'm sorry - I realise that this
> is probably really easy but my brain isn't working today and the
> examples on php.net seem incomprehensible to me.
>
// $key = 'Freq';
$key = 'Name';
function callback($a, $b) {
global $key;
if ($a[$key] == $b[$key]) return 0;
return $a[$key] > $b[$key] ? 1 : -1;
}
uasort($array, 'callback');
JW
[Back to original message]
|