note 50251 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 15 Jul 2007 12:50:10 +0000 |
| Subject: | note 50251 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-128590@lists.php.net to get a copy of this message | ||
Note Submitter: farooqym at ieee dot org
----
This function will return an array containing the months between two dates:
function get_months ( $start, $end ) {
while ( strtotime($start) <= strtotime($end) ) {
$months[] = date("F, Y", strtotime( "$start" ) );
$start = date("Y-m-d", strtotime( "$start + 1 months")) ;
}
return $months;
}