Version: current

# Function column_sort

Sort a 2D array by particular column.

Located at sapphire/core/model/DataObjectSet.php

## Parameters summary

`array` | `& $data` | $data The array to sort.
`string` | `$column` | $column The name of the column you wish to sort by.
`string` | `$direction = "ASC"` | $direction Direction to sort by, either "ASC" or "DESC".
`boolean` | `$preserveIndexes = true` | $preserveIndexes Preserve indexes

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -