$people = array(
array('id' => 12345,'first_name' => 'Joe1','date' => '02/06/2011'),
array('id' => 12346,'first_name' => 'Joe','date' => '01/27/2011'),
array('id' => 12347,'first_name' => 'rah','date' => '01/22/2011'),
array('id' => 12348,'first_name' => 'sar','date' => '02/21/2011'),
array('id' => 12349,'first_name' => 'raj','date' => '04/18/2011'),
array('id' => 12350,'first_name' => 'viv','date' => '01/31/2011'),
);
我希望这个数组元素按日期排序,然后根据php中日期的升序重新排列数组元素 说后续过程应如下所示,
var_export($people);
//answer
array(
array('id' => 12347, 'first_name' => 'rah', 'date' => '01/22/2011'),
array('id' => 12346, 'first_name' => 'Joe', 'date' => '01/27/2011'),
array('id' => 12350, 'first_name' => 'viv', 'date' => '01/31/2011'),
array('id' => 12345, 'first_name' => 'Joe1', 'date' => '02/06/2011'),
array('id' => 12348, 'first_name' => 'sar', 'date' => '02/21/2011'),
array('id' => 12349, 'first_name' => 'raj', 'date' => '04/18/2011')
)