Does anybody have an idea how can I sort this array by key (date) in PHP?
Array ( [2011-02-16] => Array ( [date] => 2011-02-16
This should help you brush up on the basics of array sorting in PHP
http://www.the-art-of-web.com/php/sortarray/
Something like this would sort your problem however:
usort($array, "cmp"); function cmp($a, $b){ return strcmp($b['date'], $a['date']);