If I have an associative array like this
$array = array();
$array['e01'] = '03/16/2012';
$array['e02'] = '03/14/2012';
$array['e05'] = '03/01/2014';
I’d like to sort the array by date then loop through the results to get the value of the index, i.e. e01, e02, e05. I need that index to retrieve information from an object.
From the PHP documentation on
asort(). This will sort it by value and let you access the key and value of each index: