Search found 1 match

by kecajs
Mon Apr 26, 2010 11:54 am
Forum: PHP - Code
Topic: [PHP]counting how many yrs, mths and d's go since any date
Replies: 2
Views: 50

[PHP]counting how many yrs, mths and d's go since any date

counting how many years, months and days go since any date past to current date, eg. 15-05-2007 (historical date) - 26-04-2010 (current date) = 2 years, 11 months, 19 days. I've tried something like this: [syntax=php] <?php $d1 = strtotime('2007-05-15'); $d2 = time(); $y1 = date('Y', $d1); $y2 = da...