# Sorting date in php array



## peterjcs (Jan 23, 2007)

There are php sort() function to sort array. But the problem that i face is how to sort the two-dimensional array and sort the date in desending order? the array is as below


```
$data = array();

$data[0][0] = "2008-05-23";
$data[0][1] = "data 1";
$data[1][0] = "2008-05-15";
$data[1][1] = "data 2";
$data[2][0] = "2008-06-06";
$data[2][1] = "data 3";
$data[3][0] = "2008-05-08";
$data[3][1] = "data 4";
```
Any help is appreciated. Thank.


----------



## Redcore (Aug 14, 2007)

You may have to sort it manually if sorting two-dimensional arrays are not supported by the SORT feature, unfortunately.


----------

