List Info

Thread: note 61579 added to function.mktime




note 61579 added to function.mktime
user name
2006-02-07 08:07:53
Here's a way to find your age.  I couldn't make the other
examples work, so I made this one.

<?PHP
//Birthday in this format: year-month-day
$b_day = '1983-11-26';
//display your age to a nice round decimal using floor()
echo floor((strtotime(date("Y-m-d")) -
strtotime($b_day)) / (60 * 60 * 24 * 365));

?>

I hope you guys have great luck with this one!  

Anna Marie
----
Server IP: 64.246.30.37
Probable Submitter: 70.238.225.138
----
Manual Page -- http
://www.php.net/manual/en/function.mktime.php
Edit        -- http://master.php.net/manage/user-notes.php?action=
edit+61579
Delete: added to the manual -- htt
p://master.php.net/manage/user-notes.php?action=delete+61579
&report=yes&reason=added+to+the+manual
Delete: bad code            -- http://master.
php.net/manage/user-notes.php?action=delete+61579&report
=yes&reason=bad+code
Delete: spam                -- http://master.php.
net/manage/user-notes.php?action=delete+61579&report=yes
&reason=spam
Delete: useless             -- http://master.p
hp.net/manage/user-notes.php?action=delete+61579&report=
yes&reason=useless
Delete: non-english         -- http://mast
er.php.net/manage/user-notes.php?action=delete+61579&rep
ort=yes&reason=non-english
Delete: already in docs     -- http://
master.php.net/manage/user-notes.php?action=delete+61579&
;report=yes&reason=already+in+docs
Delete: other reasons       -- http://master.php.net/manage/user-
notes.php?action=delete+61579&report=yes
Reject      -- http://master.php.net/manage/user-
notes.php?action=reject+61579&report=yes
Search      -- http://ma
ster.php.net/manage/user-notes.php

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

note 61579 deleted from function.mktime by mazzanet
user name
2006-02-07 10:31:18
Note Submitter:  

----

Here's a way to find your age.  I couldn't make the other
examples work, so I made this one.

<?PHP
//Birthday in this format: year-month-day
$b_day = '1983-11-26';
//display your age to a nice round decimal using floor()
echo floor((strtotime(date("Y-m-d")) -
strtotime($b_day)) / (60 * 60 * 24 * 365));

?>

I hope you guys have great luck with this one!  

Anna Marie

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

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )