I want to sort the array without losing the keys.I read many similar questions here on stackoverflow but none of them deals with date as key. Hope someone can help me!
Here is the array that I want to sort.
$data = array (
'October 8, 2015' =>
array (
'admin' =>
array (
'checkin' => 1,
'checkout' => 0,
),
),
'September 8, 2015' =>
array (
'admin' =>
array (
'checkin' => 1,
'checkout' => 0,
),
),
'September 7, 2015' =>
array (
'admin' =>
array (
'checkin' => 1,
'checkout' => 1,
),
),
'September 6, 2015' =>
array (
'admin' =>
array (
'checkin' => 2,
'checkout' => 2,
),
),
'September 5, 2015' =>
array (
'admin' =>
array (
'checkin' => 1,
'checkout' => 1,
),
),
'September 4, 2015' =>
array (
'admin' =>
array (
'checkin' => 1,
'checkout' => 1,
),
),
'September 3, 2015' =>
array (
'admin' =>
array (
'checkin' => 2,
'checkout' => 2,
),
),
'September 2, 2015' =>
array (
'admin' =>
array (
'checkin' => 2,
'checkout' => 1,
),
),
);