Re: [PHP] finding out the age from a birthdate

2004-12-15 Thread Greg Donald
On Tue, 14 Dec 2004 22:37:41 +0100, Merlin <[EMAIL PROTECTED]> wrote: > i am somehow strugling to find out how to get the age of a person from its > birthdate. > > Has anybody an idea how to do that? function getAge( $b ) { $b = date( 'Y-m-d', strtotime( $b ) ); $a = explode( '-', $b );

[PHP] finding out the age from a birthdate

2004-12-14 Thread Merlin
Hi there, i am somehow strugling to find out how to get the age of a person from its birthdate. If I divide the date from today, there still is a year instead of the age. And deviding the years does not work since we should be accurat about the day. I tried: $age[] = date("Y",(time()-$birthday))