strtotime

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

 



$now=date("Y-m-d");

A = $mydata->birthday = 1928-02-12;
B = $mydata->birthday = 1965-03-18;
C = $mydata->birthday = 1976-04-11;

I'm doing a demographic sort.

How do I calculate whether $mydata->Birthday falls into these categories below? I'm working my way right now through the manual: http://ca.php.net/manual/en/function.strtotime.php.

I cannot just calculate:
$mydata->birthday - $now  = X age bracket.


80+ year category |  A  |
70+ year category
60+ year category
50+ year category
40+ year category |  B  |
30+ year category |  C  |
21+ year category

Thans for any inspiration. I can find and hack code. I'm just like to understand it myself.

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