\App\UtilArr

Summary

Methods
Properties
Constants
getTree()
arraySort()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getTree()

getTree(array  $data, integer  $increment, string  $id = 'id', string  $pid = 'pid', string  $nodes = 'children') : array

获取树形结构

Parameters

array $data
integer $increment
string $id
string $pid
string $nodes

Returns

array

arraySort()

arraySort(array  $array, string  $key, integer  $sort = SORT_DESC) : array

二维数组根据指定KEY排序

Parameters

array $array
string $key
integer $sort

Returns

array