Archive for: July, 2014

How to take the first and the last day of a month in PHP

  • July 21, 2014
  • Boursinos Website
  • php
  • Comments Off on How to take the first and the last day of a month in PHP

While i was searching how to take the first and the last day of a month in php i found two functions that returns to you those dates. Here are the two functions. function lastday($month = ”, $year = ”) { if (empty($month)) { $month = date(‘m’); } if (empty($year)) { $year = date(‘Y’); }…