Find earliest and latest dates from a list of dates.
Pictorial Presentation:
<?php $dates = array('2015-02-01', '2015-02-02', '2015-02-03'); echo "Latest Date: ". max($dates)."\n"; echo "Earliest Date: ". min($dates)."\n"; ?>
Sample Output:
Latest Date: 2015-02-03 Earliest Date: 2015-02-01
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer