I need to find the maximum and minimum date from a given array using PHP.
I have $date_arr which contains following values,
$date_arr = array(\'0\'
max() and min() works fine with your array:
max()
min()
echo "Latest Date: ". max($dates)."\n"; echo "Earliest Date: ". min($dates)."\n";