/ Published in: PHP
URL: http://itpro.nikkeibp.co.jp/article/Watcher/20070822/280097/
生年月日から年齢を計算する簡単な計算式
(今日の日付-誕生日)/10000の小数点以下切捨て。
Expand |
Embed | Plain Text
$birthday = 19830112; $today = 20070827; $age = (int)(($today - $birthday)/10000);
You need to login to post a comment.
