wp_list_sort

Sorts a list of objects, based on one or more orderby arguments.