RE: [PHP] request
| From: | John W. Holmes | Date: | Sat, 19 Apr 2003 20:06:35 +0000 |
| Subject: | RE: [PHP] request | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144501@lists.php.net to get a copy of this message | ||
> You should be able to get a timestamp from that string using
> strtotime($user_date)(maybe with a little tweaking) and then use the
> function shown in this link to get the number of
> years,months,weeks,days, hours,minutes,and seconds via an array
returned
> from the function. it just requires a $start_time and $end_time, both
> unix epoch time stamps.
>
> http://www.phpexamples.net/codeExSnippet-24.html
That code is pretty messed up. I don't see where it even returns the
number of years, although it says it does. The __LINE__ and __FILE__
references are not really worth much since they'll always be the line
and file where the function is located, not from where it was called.
The logic is a little screwy, but for the most part, it'll return the
other items, I guess.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/