將傳入的陣列重新根據某個欄位做排序
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
/**
* 根據傳入的$arrays裡面的某個欄位$sort_key做排列
* @param [array] $arrays [需要排序的陣列]
* @param [string] $sort_key [排序依據]
* @param [string] $sort_order [ASC or DESC]
* @param [string] $sort_type [字串或是數字]
*/
function my_sort($arrays,$sort_key,$sort_order