<?php
$string = explode('-','8/12/2013-19/11/2013');
$date1 = explode('/',$string[0]);
$date2 = explode('/',$string[1]);
echo $finalDate1 = $date1[0].'-'.$date1[1].'-'.$date1[2];
echo '<br>';
echo $finalDate2 = $date2[0].'-'.$date2[1].'-'.$date2[2];
?>
Comments
Post a Comment