|
Posted by christiang on 02/07/06 11:49
Hi Erwin, I tried in many ways, using also usort but it doesn't work.
This is my last test:
- iniside the method of the class -
usort($arr, array ($this,"cmp"));
function cmp($a, $b)
{
if ($a['relationCount_int'] == $b['relationCount_int']) {
return 0;
}
return ($a['relationCount_int'] > $b['relationCount_int']) ? -1 : 1;
}
debugging it is comparing the right values, but the order doesn't
change. Could be the fact that the array has as index a string instead
of number? Cheers, chr
Navigation:
[Reply to this message]
|