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






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"];  
?>
  
  








Related examples in the same category

1.Acquiring Date Information with getdate()
2.Return array from getdate( )
3.The Associative Array Returned by getdate()
4.getdate() with a specific timestamp
5.Finding the month, day, and year