Posted by brechmos on 01/22/08 19:17
I knew there must be a good answer. Thanks.
>
> function _mysort($a,$b){
> $a_array = explode('/',$a);
> $asorter = isset($a_array[2]) ? $a_array[2] : '';
> $b_array = explode('/',$b);
> $bsorter = isset($b_array[2]) ? $b_array[2] : '';
> return strcmp($asorter,$bsorter);}
>
> usort($array,'_mysort');
>
> --
> Rik Wasmus
[Back to original message]
|