Re: All Monday's & Thursdays
- From: "Janwillem Borleffs" <jw@xxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 12:54:31 +0200
malcolm wrote:
Here's the script I used;[...]
<?php
$day = date('D', $ts = strtotime('thursday', $ts));
echo "$day";
Note that $ts isn't initialized, so what you are really passing to date() as
the timestamp is 0, at least on my WinXP setup running PHP 5.1.2.
Perhaps earlier PHP versions translate your code into a negative timestamp,
or strtotime returns an error, which also results into a negative timestamp
(-1).
Try something as follows instead:
$day = date('D', $ts = strtotime('thursday'));
When this also returns an error, try capitalizing "thursday":
$day = date('D', $ts = strtotime('Thursday'));
JW
.
- Follow-Ups:
- Re: All Monday's & Thursdays
- From: malcolm
- Re: All Monday's & Thursdays
- References:
- All Monday's & Thursdays
- From: Stuart Colman
- Re: All Monday's & Thursdays
- From: Janwillem Borleffs
- Re: All Monday's & Thursdays
- From: Janwillem Borleffs
- Re: All Monday's & Thursdays
- From: Stuart Colman
- Re: All Monday's & Thursdays
- From: malcolm
- Re: All Monday's & Thursdays
- From: Janwillem Borleffs
- Re: All Monday's & Thursdays
- From: malcolm
- All Monday's & Thursdays
- Prev by Date: Re: All Monday's & Thursdays
- Next by Date: Re: All Monday's & Thursdays
- Previous by thread: Re: All Monday's & Thursdays
- Next by thread: Re: All Monday's & Thursdays
- Index(es):