note 89454 modified in function.date by danbrown
| From: | danbrown@php.net | Date: | Sun, 08 Mar 2009 23:45:34 +0000 |
| Subject: | note 89454 modified in function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151637@lists.php.net to get a copy of this message | ||
<?php
// Output all dates between two dates
$start_date = mktime( 0, 0, 0, 01, 01, 2008);
$end_date = mktime( 0, 0, 0, 03, 01, 2008);
do{
echo date('m-d-Y', $start_date) . "<br>";
$start_date = strtotime('+1 day', $start_date);
}
while($start_date <= $end_date);
?>
--was--
<?
// Output all dates between two dates
$start_date = mktime( 0, 0, 0, 01, 01, 2008);
$end_date = mktime( 0, 0, 0, 03, 01, 2008);
do{
echo date('m-d-Y', $start_date) . "<br>";
$start_date = strtotime('+1 day', $start_date);
}
while($start_date <= $end_date);
?>
http://php.net/manual/en/function.date.php