note 81739 deleted from function.strtotime by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 04:01:22 +0000 |
| Subject: | note 81739 deleted from function.strtotime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142104@lists.php.net to get a copy of this message | ||
Note Submitter: jimworm at gmail dot com
----
To get the first day of any month, simply force the day using the formatting option of date(), like
this:
<?php
// Find the first day of last month, formatted d/m/Y
$lastmonth01 = date("01/m/Y", strtotime("last month"));
?>