In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] says...
> Why would strtotime fail (i.e. return a -1)? I check the type with gettype,
> which tells me that the argument I'm passing in is a string. I cast it to a
> string before passing it in, with the same results (returns a -1). The only
> thing that seems to do anything is to settype it to "string" before calling
> strtotime, which ends up with bizarre results.
> The arguments I'm passing in are, for example 11:00, 13:00, 14:30, etc, and
> are coming out of a database. Only SOME of this data results in a -1 when I
> call strtotime on it. Other records (the same numbers - 11:00, 13:00, etc.)
> come out fine.
> Could the data that's failing strtotime have been corrupted on data-entry?
> Why does is_string on this data tell me it's a string?
> --Jennifer Koenig
For a first guess, try using trim or chop on the data before feeding it to
strtotime, in case there are unexpected white spaces in the data.
Quod subigo farinam
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php