I have an array with these dates.
.array(34) {
[0]=>
string(24) "Wed Nov 14 2012 09:27:49"
[1]=>
string(24) "Tue Nov 13 2012 15:49:06"
[2]=>
string(24) "Wed Nov 14 2012 09:27:49"
[3]=>
string(24) "Mon Dec 03 2012 13:58:16"
[4]=>
string(24) "Tue Nov 13 2012 14:20:16"
[5]=>
string(24) "Mon Dec 03 2012 16:13:38"
[6]=>
string(24) "Thu Aug 30 2012 15:05:56"
[7]=>
string(24) "Thu Aug 30 2012 15:11:32"
[8]=>
string(24) "Thu Aug 30 2012 15:21:12"
[9]=>
string(24) "Fri Oct 05 2012 10:11:28"
[10]=>
string(24) "Thu Aug 30 2012 15:22:58"
[11]=>
string(24) "Thu Aug 30 2012 14:38:13"
[12]=>
string(24) "Thu Aug 30 2012 15:22:00"
[13]=>
string(24) "Thu Aug 30 2012 15:03:15"
[14]=>
string(24) "Thu Aug 30 2012 15:00:11"
[15]=>
string(24) "Thu Aug 30 2012 15:01:25"
[16]=>
string(24) "Thu Aug 30 2012 15:20:26"
[17]=>
string(24) "Thu Aug 30 2012 14:59:21"
[18]=>
string(24) "Thu Aug 30 2012 15:26:48"
[19]=>
string(24) "Thu Aug 30 2012 14:58:34"
[20]=>
string(24) "Wed Sep 19 2012 09:42:57"
[21]=>
string(24) "Thu Aug 30 2012 15:24:34"
[22]=>
string(24) "Thu Aug 30 2012 15:06:50"
[23]=>
string(24) "Thu Aug 30 2012 14:57:42"
[24]=>
string(24) "Thu Aug 30 2012 15:09:06"
[25]=>
string(24) "Thu Aug 30 2012 14:53:13"
[26]=>
string(24) "Thu Aug 30 2012 15:25:35"
[27]=>
string(24) "Thu Oct 11 2012 15:19:10"
[28]=>
string(24) "Wed Oct 10 2012 11:27:15"
[29]=>
string(24) "Mon Dec 03 2012 16:24:06"
[30]=>
string(24) "Thu Nov 01 2012 10:00:42"
[31]=>
string(24) "Wed Nov 21 2012 11:08:36"
[32]=>
string(24) "Mon Dec 03 2012 16:14:29"
[33]=>
string(24) "Mon Dec 03 2012 16:30:31"
}
How do I sort this array by the date and the time? For example, "Mon Jan 01 2012 01:01:01" would be the first element in the array, and "Mon Jan 01 2012 01:01:03" would be the second element in the array.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…