Re: sort array by key
Boefje wrote:
> I have looked at the sort functions at PHP.net, but could not find the
> solution.
>
You have missed usort():
function cmp($a, $b) {
if ($a['speeldagvolgnr'] == $b['speeldagvolgnr']) {
return 0;
}
return ($a['speeldagvolgnr'] < $b['speeldagvolgnr']) ? -1 : 1;
}
usort($matches, "cmp");
JW
|