4
我有一个数组像这样,我想解决这阵日期明智如何排序的数组数组排序包含在PHP日期
Array
(
[0] => 28/02/2016
[1] => 30/01/2016
[2] => 16/02/2016
[3] => 19/02/2016
[4] => 24/02/2016
[5] => 13/02/2016
[6] => 18/02/2016
[7] => 27/02/2016
[8] => 25/02/2016
[9] => 01/02/2016
[10] => 02/02/2016
[11] => 03/02/2016
[12] => 05/02/2016
[13] => 06/02/2016
[14] => 07/02/2016
[15] => 08/02/2016
[16] => 11/02/2016
[17] => 12/02/2016
)
我已经使用usort,但它不工作,我在其中我正在发挥一个功能,并将其转换为strtotime,但它不起作用。任何建议。
显示你写的功能。用'-'替换'/'可能会解决这个问题。 –
选中此项可能有用。 http://stackoverflow.com/questions/16733128/sort-array-by-date-in-descending-order-by-date-in-php @ user3270582 – RJParikh
将格式更改为'dmY',以便它可以被修改'strottime'像sougata说,它会工作 – Ghost