Mega Code Archive

 
Categories / Php / Strings
 

Getting the Day and Week of the Year

<?php  $mydates = array('2010-01-01', '2010-06-30', '2010-12-31');  foreach($mydates as $mydate) {      $ts = strtotime($mydate);      echo 'Day ' . date('d M Y: z', $ts) . "<br />\n";  }  ?>