I am so confused about this...
Can someone please explain this example for me.
<?php
function cmp($a, $b)
{
if ($a == $b) {
return 0;
}
return ($a < $b) ? -1 : 1;
}
$a = array(3, 2, 5, 6, 1);
usort($a, "cmp");
?>
I even echo'd out $a and $b in the function and it still didn't make sense.