Mega Code Archive

 
Categories / Php / Date Time
 

To obtain a number corresponding to the day of the week, use getdate() instead

<?php           $ts = strtotime('04 Jul 2007');          $gd = getdate($ts);           $day = $gd["wday"];   ?>