Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function array_sort_by_column(&$arr, $col, $dir = SORT_ASC) {
- $sort_col = array();
- foreach ($arr as $key=> $row) {
- $sort_col[$key] = $row[$col];
- }
- array_multisort($sort_col, $dir, $arr);
- }
Add Comment
Please, Sign In to add comment