Posted By

bluecap on 02/22/12


Tagged


Versions (?)

Get last day of month


 / Published in: PHP
 

Easy way to get the last day of a month in PHP.

  1. <?php
  2.  
  3. // Last day of current month
  4. echo date('t');
  5.  
  6. // Last day of specified month
  7. date('m/t/Y', mktime(0, 0, 0, 6, 1, 2012));
  8.  
  9. ?>

Report this snippet  

You need to login to post a comment.