note 39381 added to function.strtotime
| From: | meATashleyhuntDOTcoDOTuk at rn2 dot php dot net | Date: | Tue, 27 Jan 2004 02:11:28 +0000 |
| Subject: | note 39381 added to function.strtotime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64217@lists.php.net to get a copy of this message | ||
I wanted to get the date of the next "$day" so I could print it on automated tickets,
using 'strtotime' 'next thursday' worked on one server, but not another. I then
tryed 'this' instead of 'next'.
<?
if ($day == date('l'))
{
$next = "";
}
else{
$next = "this "; // using 'this' instead of 'next' worked for me!?
}
$str = strtotime("$next$day"); // Get next DAY timestamp
$validdate = date('d/m/Y', $str); // Echo date if preffered format
?>
Hope this helps someone?
----
Manual Page -- http://www.php.net/manual/en/function.strtotime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39381
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39381&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39381&report=yes
Search -- http://master.php.net/manage/user-notes.php