Files
HotLunches/date.test.php
T
2026-10-19 15:22:52 -07:00

17 lines
338 B
PHP

<?php
$dates = array('31/05/1997','14/07/1996','31/03/1999','02/03/1999');
for ($i = 0; $i < count($dates); $i++) {
$date = $dates[$i];
$yr = substr($date,6,4);
$mo = substr($date,3,2);
$dy = substr($date,0,2);
$ndate = "$yr-$mo-$dy";
// $ndate = date("Y-m-d",strtotime($date));
echo("$date -> $ndate\n");
}
?>