I have the array of dates below
array(5) { [0]=> string(19) \"2012-06-11 08:30:49\" [1]=> string(19) \"2012-06-07 08:03:54\" [2]=> st
Try this:
public function getLargerDate(array $datas) { $newDates = array(); foreach($datas as $data){ $newDates[strtotime($data)] = $data; } return $newDates[max(array_keys($newDates))]; }