public function sortArrayByColumn(&$arr, $col)
    {
        $newArray = [];
        $sort_col = array();
        foreach ($arr as $key => $row) {
            $sort_col[$key] = strtoupper($row[$col]);
        }
        asort($sort_col, SORT_LOCALE_STRING);

        foreach ($sort_col as $key => $val) {
            $newArray[$key] = $arr[$key];
        }

        $arr = $newArray;
    }
public function sortArrayByColumn(&$arr, $col)
    {
        $newArray = [];
        $sort_col = array();
        foreach ($arr as $key => $row) {
            $sort_col[$key] = strtoupper($row[$col]);
        }
        asort($sort_col, SORT_LOCALE_STRING);

        foreach ($sort_col as $key => $val) {
            $newArray[$key] = $arr[$key];
        }

        $arr = $newArray;
    }
public function sortArrayByColumn ( & $ arr , $ col ) { $ newArray = [ ] ; $ sort_col = array ( ) ; foreach ( $ arr as $ key => $ row ) { $ sort_col [ $ key ] = strtoupper ( $ row [ $ col ] ) ; } asort ( $ sort_col , SORT_LOCALE_STRING ) ; foreach ( $ sort_col as $ key => $ val ) { $ newArray [ $ key ] = $ arr [ $ key ] ; } $ arr = $ newArray ; }
Sort array by given column
@param array $arr the array
@param string $col the column
@return void
Sort array by given column