Hi I have a list of arrays which im getting using a foreach loop that each contain a date.
I want to do another foreach loop to output each array but order them based on the date.
It is currently outputting:
Array
(
[0] => 31.08.2016
[1] => prize10
)
Array
(
[0] => 31.07.2017
[1] => prize10
)
Array
(
[0] => 31.08.2017
[1] => prize6
)
Array
(
[0] => 21.08.2017
[1] => prize6
)
and the code i have is :
foreach ( $unclaimed_users as $unclaimed_user ) {
$a = get_user_meta($unclaimed_user->ID , "unclaimed");
$unserialized = unserialize($a[0]);
//echo $unserialized[0]; //Date
//echo $unserialized[1]; //Prize
print_r($unserialized);
}
But these are in no specific order, how can I make them output based on the most recent date