note 41356 deleted from function.mktime by nlopess
| From: | nlopess@php.net | Date: | Fri, 09 Apr 2004 14:28:11 +0000 |
| Subject: | note 41356 deleted from function.mktime by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-67893@lists.php.net to get a copy of this message | ||
Note Submitter: rv@domos.be
----
ok i had a problem with a date is retrieved from a cookie.
the cookie was named 'weergavedatum' and gave me eg. 2004-04-06.
Now when a user selected hour 24 (in a dropdown-box r something) i wanted the date to change to
2004-04-07 (this didn't work with strtotime)
**$tilluur and $tillmin hold the selected hour and the selected minutes**
if ($tilluur==24)
{
$tilluur='00';
$year=substr($weergavedatum,0,4);
$month=substr($weergavedatum,5,2);
$day=substr($weergavedatum,8,2);
$tussendatum= mktime ($tilluur,$tillmin,00,$month,$day+1,$year);
$pdtill= date('Y-m-d H:i',$tussendatum);
}