John Taylor-Johnston wrote:

Is there a way to reverse engineer http://www.php.net/manual/en/function.date.php ?

I want to feed in 2003-02-28 and extract February 28, 2003. I can substr it out ...

$eventid = "2003-02-28";

$year = substr($eventid, 0,4);
$month = substr($eventid, 5,7);
$year = substr($eventid, 8,10);

But there must be a function that would do it? Everything else exists :)

not sure what you mean exactly, but you're simply trying to turn 2003-02-28 into February 28, 2003 the following statement will work



echo date("F d, Y", strtotime("2003-02-28"));


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to