strtotime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

In a mysql date() field, I set the default to "0000-00-00".

Therefore, $mydata->birthday = "0000-00-00";

But when I run this next line, $then = 1969.

$then=date("Y", strtotime($mydata->birthday));

Why 1969, and not 0 or nothing?

If I  echo strtotime("0000-00-00");

Nothing appears. So $then should be nothing?

What is wrong with my logic?

Thanks,
John

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux