public static function order(array $array, array $columns)
    {
        $arrayMultisortParameters = [];
        foreach ($columns as $column => $order) {
            $arrayMultisortParameters[] = array_column($array, $column);
            $arrayMultisortParameters[] = $order;
        }
        $arrayMultisortParameters[] = &$array;
        array_multisort(...$arrayMultisortParameters);

        return $array;
    }
public static function order(array $array, array $columns)
    {
        $arrayMultisortParameters = [];
        foreach ($columns as $column => $order) {
            $arrayMultisortParameters[] = array_column($array, $column);
            $arrayMultisortParameters[] = $order;
        }
        $arrayMultisortParameters[] = &$array;
        array_multisort(...$arrayMultisortParameters);

        return $array;
    }
public static function order ( array $ array , array $ columns ) { $ arrayMultisortParameters = [ ] ; foreach ( $ columns as $ column => $ order ) { $ arrayMultisortParameters [ ] = array_column ( $ array , $ column ) ; $ arrayMultisortParameters [ ] = $ order ; } $ arrayMultisortParameters [ ] = & $ array ; array_multisort ( ... $ arrayMultisortParameters ) ; return $ array ; }
Order an array

@param array $array
@param array $columns array of 'column' => SORT_*

@return array
Order an array