i have seen several SO answers but none seem to address this very simple situation.
my array looks like the following:
$myArray =
['person_1@gmail.com'] =>
['2017-01-05'] =>
'this is line one'
'this is line two'
['2016-05-05'] =>
'this is another line'
'and this is a fourth line'
['2017-07-10'] =>
'more lines'
'yet another line'
['person_2@gmail.com'] =>
['2015-01-01'] =>
'line for person_2'
within each of the first levels (email address), how would I sort the second level (date yyyy-mm-dd) in descending?
I did try this:
foreach ( $myArray as $emailAddress => $emailAddressArrayOfDates ) {
usort ( $myArray[$emailAddress] );
}
and I also tried to ksort with a function as well with no success.
thank you very much.