RE: [PHP] convert a strtotime date into a text representation of the date
| From: | Martin Towell | Date: | Thu, 04 Mar 2004 04:44:41 +0000 |
| Subject: | RE: [PHP] convert a strtotime date into a text representation of the date | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179417@lists.php.net to get a copy of this message | ||
> hi.
>
> i found strtotime and it seems to work but not quite sure if
> i know how to use it right...
> here is my code:
> <?php
> $time= strtotime("third saturday january 2005");
> echo date("M/D/YY", $time);
> ?>
>
> i wanted it to take the third saturday of next year (2005)
> and say do this: saturday january 24?? 2005 for the output.
> All I get for the output though is sat/june/20092009?? I'm
> sort of confused now...
>
> any ideas on what the problem is?
Hiya
You'd want something more like this for the format:
echo date("l F j Y", $time);
but for me, this caused the following output
Saturday June 27 2009
doesn't seem right somehow :/
Martin