Get most recent date from an array of dates in “Y-m-d H:i:s” format

Use max(), array_map(), and strtotime().

$max = max(array_map('strtotime', $arr));
echo date('Y-m-j H:i:s', $max); // 2012-06-11 08:30:49

Leave a Comment