- strtotime: documentation ( source)
- usort: documentation ( source)
<?php
$sort_dates = function($a, $b)
{
$a = strtotime($a['birthday']);
$b = strtotime($b['birthday']);
if ($a == $b) {
return 0;
}
return ($a < $b) ? -1 : 1;
};
usort($upcoming, $sort_dates);