John Taylor-Johnston wrote:
Chris wrote:
John Taylor-Johnston wrote:
How do I take "2007-02-01" and turn it into Thursday, February 1, 2006?
Use strtotime (http://php.net/strtotime) to turn it into a timestamp
and then format it using date (http://php.net/date).
echo date("l, F j, Y", strtotime("2007-02-01"));
That's it?
Seems to work ;)
$ php -a
<?php
Interactive mode enabled
echo date("l, F j, Y", strtotime("2007-02-01"));
Thursday, February 1, 2007
Just noticed your original message said about turning 2007-02-01 into
2006 :P heh.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php