PHP Sort Array by Column

$arr = array();
$arr[] = array(
    "id" => 1,
    "name" => "John",
    "money" => 20,
);
$arr[] = array(
    "id" => 2,
    "name" => "Doe",
    "money" => 40,
);

// SORT_ASC for ascending
// SORT_DESC for descending
function array_sort_by_column(&$arr, $col, $dir = SORT_DESC)
{
    $sort_col = array();
    foreach ($arr as $key => $row) {
        $sort_col[$key] = $row[$col];
    }
    array_multisort($sort_col, $dir, $arr);
}

// call function
array_sort_by_column($arr, 'money');