public function orderBy(array $array, $key = 'sort', $type = SORT_DESC)
    {
        $array2 = [];
        foreach ($array as $k => $v) {
            $array2[$k] = $v[$key];
        }
        array_multisort($array2, $type, $array);

        return $array;
    }
public function orderBy(array $array, $key = 'sort', $type = SORT_DESC)
    {
        $array2 = [];
        foreach ($array as $k => $v) {
            $array2[$k] = $v[$key];
        }
        array_multisort($array2, $type, $array);

        return $array;
    }
public function orderBy ( array $ array , $ key = 'sort' , $ type = SORT_DESC ) { $ array2 = [ ] ; foreach ( $ array as $ k => $ v ) { $ array2 [ $ k ] = $ v [ $ key ] ; } array_multisort ( $ array2 , $ type , $ array ) ; return $ array ; }
Sort multi-dimensional array

@param array $array
@param string $key
@param int $type
@return array
Sort multi - dimensional array