Last day of the month   PHP


Summary

Get last day of the month


<?php
$date = '2000-01-01';
$last_of_day = date('t', strtotime($date));
print_r($last_of_day);
?>

the Last of day of January is 31.


Result

31

References


Tags

#date  #day  #month 


[ Edit (Author only) ]