Sort an array of dates using usort() and sort() functions by the timestamp converted by mktime()

前端 未结 2 675
猫巷女王i
猫巷女王i 2021-01-26 11:59

I have an array of dates and I have to sort it by using the described functions.

Here is what I have:

$dates = array (\'10-10-2003\', \'2-17-2002\', \'2-         


        
2条回答
  •  一生所求
    2021-01-26 12:19

    Here's an alternate solution for you.

     2-17-2002
            [1] => 2-16-2003
            [2] => 10-10-2003
            [3] => 10-10-2004
            [4] => 1-01-2005
        )
    */
    

提交回复
热议问题