Hello,
I would like to use the "usort" function to sort a multidimensional array.
But the function i have to use as the second parameter doesn't accept $vars...
This is the normal use :
function cmp($a,$b)
{
if ($a['ID']==$b['ID']) return 0;
if ($a['ID']>$b['ID']) return 1;
if ($a['ID']<$b['ID']) return -1;
};
usort($array,"cmp");
reset($array);
How could i use a $var instead of 'ID', in cmp() ?
Any idea ?
Thanx.
Thomas.