What is the best way to sort an array of objects where you need one field sorted in one order and the others fields in another order?
In the array of objects below, I would like to sort them by "date" in descending order, then "last" (name) by ascending order, and "first" (name) in ascending order as well.
$arr = array();
$obj = new stdclass();
$obj->date = '20080510';
$obj->first = 'Jane';
$obj->last = 'Doe';
$arr[] = $obj;
$obj = new stdclass();
$obj->date = '20090125';
$obj->first = 'John';
$obj->last = 'Doe';
$arr[] = $obj;
$obj = new stdclass();
$obj->date = '20080305';
$obj->first = 'Mary';
$obj->last = 'Jane';
$arr[] = $obj;