programming-examples/php/Math/Php program to Find earliest and latest dates from a list of dates..php

5 lines
152 B
PHP
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<?php
$dates = array('2015-02-01', '2015-02-02', '2015-02-03');
echo "Latest Date: ". max($dates)."\n";
echo "Earliest Date: ". min($dates)."\n";
?>